Adding LDAP Syncronization (#3219)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
87f357a54d
Коммит
ea3342aa6c
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user