summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-09 12:24:39 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-09 12:24:39 -0700
commit61f92517f317f4b3f437b8db48f31c569ceb5f2d (patch)
tree23b9d7227a502a54187af96ec91eed6e1f4b7d69 /model
parent12cd7c03d6676466f7b10b8e80b4e05edab0cf2a (diff)
downloadchat-61f92517f317f4b3f437b8db48f31c569ceb5f2d.tar.gz
chat-61f92517f317f4b3f437b8db48f31c569ceb5f2d.tar.bz2
chat-61f92517f317f4b3f437b8db48f31c569ceb5f2d.zip
PLT-586 fixing issues with security alert
Diffstat (limited to 'model')
-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 {