From 8c2c8921446c0e098fdbc1e4287fc5e9b475d88a Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 13 Apr 2016 19:31:01 -0400 Subject: Allow customization of LDAP login fields (#2692) --- model/config.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'model/config.go') diff --git a/model/config.go b/model/config.go index 26c71d07f..6803fe069 100644 --- a/model/config.go +++ b/model/config.go @@ -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 -- cgit v1.2.3-1-g7c22