summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-02-04 11:38:27 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-02-04 11:38:27 -0500
commit4f1dbb8ca9a6cce09c9a20e91e074feaadd755a8 (patch)
treed5811b516ef8b826e6ccd80efdf72c6fe52157a2 /model/config.go
parent852acf1bb2818316e40012a385a5e8bec287eb05 (diff)
parentdffc5323ecd9c7bc1af0ea06ef4827078f9bcd52 (diff)
downloadchat-4f1dbb8ca9a6cce09c9a20e91e074feaadd755a8.tar.gz
chat-4f1dbb8ca9a6cce09c9a20e91e074feaadd755a8.tar.bz2
chat-4f1dbb8ca9a6cce09c9a20e91e074feaadd755a8.zip
Merge pull request #2052 from mattermost/PLT-1429
PLT-1429 adding user created slash commands
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go50
1 files changed, 32 insertions, 18 deletions
diff --git a/model/config.go b/model/config.go
index a6d1c21dc..acb525abf 100644
--- a/model/config.go
+++ b/model/config.go
@@ -24,24 +24,26 @@ const (
)
type ServiceSettings struct {
- ListenAddress string
- MaximumLoginAttempts int
- SegmentDeveloperKey string
- GoogleDeveloperKey string
- EnableOAuthServiceProvider bool
- EnableIncomingWebhooks bool
- EnableOutgoingWebhooks bool
- EnablePostUsernameOverride bool
- EnablePostIconOverride bool
- EnableTesting bool
- EnableDeveloper *bool
- EnableSecurityFixAlert *bool
- SessionLengthWebInDays *int
- SessionLengthMobileInDays *int
- SessionLengthSSOInDays *int
- SessionCacheInMinutes *int
- WebsocketSecurePort *int
- WebsocketPort *int
+ ListenAddress string
+ MaximumLoginAttempts int
+ SegmentDeveloperKey string
+ GoogleDeveloperKey string
+ EnableOAuthServiceProvider bool
+ EnableIncomingWebhooks bool
+ EnableOutgoingWebhooks bool
+ EnableCommands *bool
+ EnableOnlyAdminIntegrations *bool
+ EnablePostUsernameOverride bool
+ EnablePostIconOverride bool
+ EnableTesting bool
+ EnableDeveloper *bool
+ EnableSecurityFixAlert *bool
+ SessionLengthWebInDays *int
+ SessionLengthMobileInDays *int
+ SessionLengthSSOInDays *int
+ SessionCacheInMinutes *int
+ WebsocketSecurePort *int
+ WebsocketPort *int
}
type SSOSettings struct {
@@ -349,10 +351,22 @@ func (o *Config) SetDefaults() {
o.ServiceSettings.SessionCacheInMinutes = new(int)
*o.ServiceSettings.SessionCacheInMinutes = 10
}
+
+ if o.ServiceSettings.EnableCommands == nil {
+ o.ServiceSettings.EnableCommands = new(bool)
+ *o.ServiceSettings.EnableCommands = false
+ }
+
+ if o.ServiceSettings.EnableOnlyAdminIntegrations == nil {
+ o.ServiceSettings.EnableOnlyAdminIntegrations = new(bool)
+ *o.ServiceSettings.EnableOnlyAdminIntegrations = true
+ }
+
if o.ServiceSettings.WebsocketPort == nil {
o.ServiceSettings.WebsocketPort = new(int)
*o.ServiceSettings.WebsocketPort = 80
}
+
if o.ServiceSettings.WebsocketSecurePort == nil {
o.ServiceSettings.WebsocketSecurePort = new(int)
*o.ServiceSettings.WebsocketSecurePort = 443