diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-05 11:13:25 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-05 11:13:25 -0600 |
commit | bd4314e977b883c1bffe4f593e187a1c62abbfec (patch) | |
tree | 89a29cb769efc36eff1fb3a99607004a6ce9cb91 /model/config.go | |
parent | e432b66641b9f11e505a8497efaeea53ab4b6ce0 (diff) | |
download | chat-bd4314e977b883c1bffe4f593e187a1c62abbfec.tar.gz chat-bd4314e977b883c1bffe4f593e187a1c62abbfec.tar.bz2 chat-bd4314e977b883c1bffe4f593e187a1c62abbfec.zip |
PLT-1558 adding session length to config file
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 24 |
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 { |