summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-01-06 16:13:10 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-01-06 16:13:10 -0500
commit5bcb9f1c50ed9c319d2a21f2ecb4816c51d18b40 (patch)
treeb24590d93e46414e849ef4af7cefe54b8b7061d7 /model/config.go
parent5855b5e4590889944e4a408f7185f84779fc701a (diff)
parent214c6bc15ed1d0c9f94d0f0545d3f95241893cdc (diff)
downloadchat-5bcb9f1c50ed9c319d2a21f2ecb4816c51d18b40.tar.gz
chat-5bcb9f1c50ed9c319d2a21f2ecb4816c51d18b40.tar.bz2
chat-5bcb9f1c50ed9c319d2a21f2ecb4816c51d18b40.zip
Merge pull request #1813 from mattermost/PLT-1558
PLT-1558 adding session length to config file
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index a4792ff9e..ed56ed0c7 100644
--- a/model/config.go
+++ b/model/config.go
@@ -36,6 +36,10 @@ type ServiceSettings struct {
EnableTesting bool
EnableDeveloper *bool
EnableSecurityFixAlert *bool
+ SessionLengthWebInDays *int
+ SessionLengthMobileInDays *int
+ SessionLengthSSOInDays *int
+ SessionCacheInMinutes *int
}
type SSOSettings struct {
@@ -306,6 +310,26 @@ func (o *Config) SetDefaults() {
o.LdapSettings.Enable = new(bool)
*o.LdapSettings.Enable = false
}
+
+ if o.ServiceSettings.SessionLengthWebInDays == nil {
+ o.ServiceSettings.SessionLengthWebInDays = new(int)
+ *o.ServiceSettings.SessionLengthWebInDays = 30
+ }
+
+ if o.ServiceSettings.SessionLengthMobileInDays == nil {
+ o.ServiceSettings.SessionLengthMobileInDays = new(int)
+ *o.ServiceSettings.SessionLengthMobileInDays = 30
+ }
+
+ if o.ServiceSettings.SessionLengthSSOInDays == nil {
+ o.ServiceSettings.SessionLengthSSOInDays = new(int)
+ *o.ServiceSettings.SessionLengthSSOInDays = 30
+ }
+
+ if o.ServiceSettings.SessionCacheInMinutes == nil {
+ o.ServiceSettings.SessionCacheInMinutes = new(int)
+ *o.ServiceSettings.SessionCacheInMinutes = 10
+ }
}
func (o *Config) IsValid() *AppError {