Allow customization of LDAP login fields (#2692)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
c801ce7cd7
Коммит
8c2c892144
@@ -185,6 +185,10 @@ type LdapSettings struct {
|
||||
// Advanced
|
||||
SkipCertificateVerification *bool
|
||||
QueryTimeout *int
|
||||
|
||||
// Customization
|
||||
LoginFieldName *string
|
||||
PasswordFieldName *string
|
||||
}
|
||||
|
||||
type ComplianceSettings struct {
|
||||
@@ -388,6 +392,16 @@ func (o *Config) SetDefaults() {
|
||||
*o.LdapSettings.UserFilter = ""
|
||||
}
|
||||
|
||||
if o.LdapSettings.LoginFieldName == nil {
|
||||
o.LdapSettings.LoginFieldName = new(string)
|
||||
*o.LdapSettings.LoginFieldName = ""
|
||||
}
|
||||
|
||||
if o.LdapSettings.PasswordFieldName == nil {
|
||||
o.LdapSettings.PasswordFieldName = new(string)
|
||||
*o.LdapSettings.PasswordFieldName = ""
|
||||
}
|
||||
|
||||
if o.ServiceSettings.SessionLengthWebInDays == nil {
|
||||
o.ServiceSettings.SessionLengthWebInDays = new(int)
|
||||
*o.ServiceSettings.SessionLengthWebInDays = 30
|
||||
|
||||
Ссылка в новой задаче
Block a user