Этот коммит содержится в:
Christopher Speller
2016-06-03 09:33:59 -04:00
коммит произвёл Joram Wilander
родитель 87f357a54d
Коммит ea3342aa6c
13 изменённых файлов: 412 добавлений и 71 удалений

Просмотреть файл

@@ -190,6 +190,9 @@ type LdapSettings struct {
NicknameAttribute *string
IdAttribute *string
// Syncronization
SyncIntervalMinutes *int
// Advanced
SkipCertificateVerification *bool
QueryTimeout *int
@@ -441,6 +444,11 @@ func (o *Config) SetDefaults() {
*o.LdapSettings.LoginFieldName = ""
}
if o.LdapSettings.SyncIntervalMinutes == nil {
o.LdapSettings.SyncIntervalMinutes = new(int)
*o.LdapSettings.SyncIntervalMinutes = 60
}
if o.ServiceSettings.SessionLengthWebInDays == nil {
o.ServiceSettings.SessionLengthWebInDays = new(int)
*o.ServiceSettings.SessionLengthWebInDays = 30
@@ -635,6 +643,10 @@ func (o *Config) IsValid() *AppError {
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_security.app_error", nil, "")
}
if *o.LdapSettings.SyncIntervalMinutes <= 0 {
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_sync_interval.app_error", nil, "")
}
return nil
}