diff options
author | Stas Vovk <stasvovk@gmail.com> | 2015-10-13 14:52:29 +0300 |
---|---|---|
committer | Stas Vovk <stasvovk@gmail.com> | 2015-10-13 14:52:29 +0300 |
commit | a1328fc8b5d03ec73f1bad588d2f0bb688b1c206 (patch) | |
tree | 4d47c0e181ebe961ab2a8a02f2698faeafba9434 /model/config.go | |
parent | 822881e51aa2edce1c4d7d2e11bc44c3886daf1e (diff) | |
parent | 0144b6fd8a95c6b65695b07483a528707dce1cfe (diff) | |
download | chat-a1328fc8b5d03ec73f1bad588d2f0bb688b1c206.tar.gz chat-a1328fc8b5d03ec73f1bad588d2f0bb688b1c206.tar.bz2 chat-a1328fc8b5d03ec73f1bad588d2f0bb688b1c206.zip |
Merge branch 'master' into PLT-589
Diffstat (limited to 'model/config.go')
-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 { |