mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix LDAP Authorization Authorizer (#15267)
https://community.librenms.org/t/8-28-sudden-ldap-authentication-issues/22176/10
This commit is contained in:
@@ -130,6 +130,7 @@ class LdapAuthorizationAuthorizer extends AuthorizerBase
|
||||
$authLdapGroups = Config::get('auth_ldap_groups');
|
||||
// Collect all roles
|
||||
foreach ($entries as $entry) {
|
||||
if (isset($entry['cn'][0])) {
|
||||
$groupname = $entry['cn'][0];
|
||||
|
||||
if (isset($authLdapGroups[$groupname]['roles']) && is_array($authLdapGroups[$groupname]['roles'])) {
|
||||
@@ -141,6 +142,7 @@ class LdapAuthorizationAuthorizer extends AuthorizerBase
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$roles = array_unique($roles);
|
||||
$this->authLdapSessionCacheSet('roles', $roles);
|
||||
|
Reference in New Issue
Block a user