summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-10-12 14:22:05 -0700
committerCorey Hulen <corey@hulen.com>2015-10-12 14:22:05 -0700
commit191e248b0fbe833c0c52e1e6145f4d19b4c3a7b6 (patch)
tree63378d3100f0a70806767c87886b3e0b9037f8c5 /model/config.go
parent246c7414bd2f22a3440af5df7d72f33e7207dc50 (diff)
parenta6a3c351a828441313e90c1ac8e6afbfadad1f7c (diff)
downloadchat-191e248b0fbe833c0c52e1e6145f4d19b4c3a7b6.tar.gz
chat-191e248b0fbe833c0c52e1e6145f4d19b4c3a7b6.tar.bz2
chat-191e248b0fbe833c0c52e1e6145f4d19b4c3a7b6.zip
Merge pull request #1022 from mattermost/release-1.1.0
Release 1.1.0rc merging to master
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 {