diff options
author | Maxim <mail@potapovmax.com> | 2015-10-13 10:15:44 +0300 |
---|---|---|
committer | Maxim <mail@potapovmax.com> | 2015-10-13 10:15:44 +0300 |
commit | 9d3248ccec89e533527bb86e082ef445c3cdfe7d (patch) | |
tree | fea41f942c66a2ae397ed12f1013585bcbf7775c /model | |
parent | 53d58fc3374268484a6eb5d8aae2c82719ec782d (diff) | |
parent | 0144b6fd8a95c6b65695b07483a528707dce1cfe (diff) | |
download | chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.gz chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.tar.bz2 chat-9d3248ccec89e533527bb86e082ef445c3cdfe7d.zip |
Merge branch 'master' into PLT-590
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/model/config.go b/model/config.go index e4b99ad4a..8a11b7bb7 100644 --- a/model/config.go +++ b/model/config.go @@ -32,6 +32,7 @@ type ServiceSettings struct { EnablePostUsernameOverride bool EnablePostIconOverride bool EnableTesting bool + EnableSecurityFixAlert *bool } type SSOSettings struct { @@ -110,9 +111,8 @@ type RateLimitSettings struct { } type PrivacySettings struct { - ShowEmailAddress bool - ShowFullName bool - EnableSecurityFixAlert bool + ShowEmailAddress bool + ShowFullName bool } type TeamSettings struct { @@ -163,6 +163,13 @@ func ConfigFromJson(data io.Reader) *Config { } } +func (o *Config) SetDefaults() { + if o.ServiceSettings.EnableSecurityFixAlert == nil { + o.ServiceSettings.EnableSecurityFixAlert = new(bool) + *o.ServiceSettings.EnableSecurityFixAlert = true + } +} + func (o *Config) IsValid() *AppError { if o.ServiceSettings.MaximumLoginAttempts <= 0 { |