Этот коммит содержится в:
Christopher Speller
2016-04-07 10:38:36 -04:00
родитель 32bc97f855
Коммит 0a2341efd2
10 изменённых файлов: 303 добавлений и 86 удалений

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

@@ -162,12 +162,13 @@ type TeamSettings struct {
type LdapSettings struct {
// Basic
Enable *bool
LdapServer *string
LdapPort *int
BaseDN *string
BindUsername *string
BindPassword *string
Enable *bool
LdapServer *string
LdapPort *int
ConnectionSecurity *string
BaseDN *string
BindUsername *string
BindPassword *string
// Filtering
UserFilter *string
@@ -180,7 +181,8 @@ type LdapSettings struct {
IdAttribute *string
// Advanced
QueryTimeout *int
SkipCertificateVerification *bool
QueryTimeout *int
}
type ComplianceSettings struct {
@@ -526,6 +528,10 @@ func (o *Config) IsValid() *AppError {
return NewLocAppError("Config.IsValid", "model.config.is_valid.rate_sec.app_error", nil, "")
}
if !(*o.LdapSettings.ConnectionSecurity == CONN_SECURITY_NONE || *o.LdapSettings.ConnectionSecurity == CONN_SECURITY_TLS || *o.LdapSettings.ConnectionSecurity == CONN_SECURITY_STARTTLS) {
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_security.app_error", nil, "")
}
return nil
}