mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Add an option for ad authentication to have a default level (#4801)
* Add an option for ad authentication to have a default level * rework as a flag indicating unspecified access is global read * Fix indentation
This commit is contained in:
@@ -156,6 +156,11 @@ function get_userlevel($username)
|
||||
global $config, $ldap_connection;
|
||||
|
||||
$userlevel = 0;
|
||||
if (isset($config['auth_ad_require_groupmembership']) && $config['auth_ad_require_groupmembership'] == 0) {
|
||||
if (isset($config['auth_ad_global_read']) && $config['auth_ad_global_read'] === 1) {
|
||||
$userlevel = 5;
|
||||
}
|
||||
}
|
||||
|
||||
// Find all defined groups $username is in
|
||||
$search = ldap_search(
|
||||
@@ -254,7 +259,7 @@ function get_userlist()
|
||||
'email' => $userhash[$key]['email']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return $userlist;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user