bugfix: LDAP is optional

This commit is contained in:
Lou Knauer 2022-07-25 17:27:42 +02:00
parent e500c1515e
commit dc4c7f0033

View File

@ -38,7 +38,7 @@ func (la *LdapAutnenticator) Init(auth *Authentication, conf interface{}) error
log.Warn("environment variable 'LDAP_ADMIN_PASSWORD' not set (ldap sync will not work)") log.Warn("environment variable 'LDAP_ADMIN_PASSWORD' not set (ldap sync will not work)")
} }
if la.config.SyncInterval != "" { if la.config != nil && la.config.SyncInterval != "" {
interval, err := time.ParseDuration(la.config.SyncInterval) interval, err := time.ParseDuration(la.config.SyncInterval)
if err != nil { if err != nil {
return err return err