summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-10-12 13:56:21 -0700
committerCorey Hulen <corey@hulen.com>2015-10-12 13:56:21 -0700
commita6a3c351a828441313e90c1ac8e6afbfadad1f7c (patch)
treee7d41a6789d421d8cbcbbb1417edf74810ac3672 /model/config.go
parent7a469c8fc19694a2d6afd2bd420ba6fd3a9a0d93 (diff)
parent9f83a72f7330857e06095403c1cf5402bef455d6 (diff)
downloadchat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.tar.gz
chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.tar.bz2
chat-a6a3c351a828441313e90c1ac8e6afbfadad1f7c.zip
Merge pull request #997 from mattermost/PLT-586
PLT-586 fixing issues with security alert
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go13
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 {