mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
Fix errors in ldap auth
This commit is contained in:
@@ -59,6 +59,8 @@ func (la *LdapAuthenticator) Init(
|
||||
log.Print("sync done")
|
||||
}
|
||||
}()
|
||||
} else {
|
||||
return fmt.Errorf("missing LDAP configuration")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -73,7 +75,7 @@ func (la *LdapAuthenticator) CanLogin(
|
||||
if user != nil && user.AuthSource == AuthViaLDAP {
|
||||
return true
|
||||
} else {
|
||||
if la.config.SyncUserOnLogin {
|
||||
if la.config != nil && la.config.SyncUserOnLogin {
|
||||
l, err := la.getLdapConnection(true)
|
||||
if err != nil {
|
||||
log.Error("LDAP connection error")
|
||||
|
Reference in New Issue
Block a user