mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow filtering of getUserlist LDAP function (#10399)
* Modification of the getUserlist fonction to use ldap filter * Modification of the getUserlist fonction to use ldap filter V2 * documentation of auth_ldap_Userlist_filter option * documentation of auth_ldap_Userlist_filter option V2 * Allow filtering of getUserlist LDAP function
This commit is contained in:
@@ -152,6 +152,9 @@ class LdapAuthorizer extends AuthorizerBase
|
||||
}
|
||||
|
||||
$filter = '(' . Config::get('auth_ldap_prefix') . '*)';
|
||||
if (Config::get('auth_ldap_userlist_filter') != null) {
|
||||
$filter = '(' . Config::get('auth_ldap_userlist_filter') . ')';
|
||||
}
|
||||
|
||||
// build group filter
|
||||
$group_filter = '';
|
||||
|
@@ -162,6 +162,7 @@ $config['auth_ldap_groupmemberattr'] = 'memberUid'; // attribute to use to see i
|
||||
$config['auth_ldap_uid_attribute'] = 'uidnumber'; // attribute for unique id
|
||||
$config['auth_ldap_debug'] = false; // enable for verbose debug messages
|
||||
$config['auth_ldap_userdn'] = true; // Uses a users full DN as the value of the member attribute in a group instead of member: username. (it’s member: uid=username,ou=groups,dc=domain,dc=com)
|
||||
$config['auth_ldap_userlist_filter'] = 'service=informatique'; // Replace 'service=informatique' by your ldap filter to limit the number of responses if you have an ldap directory with thousand of users
|
||||
```
|
||||
|
||||
### LDAP bind user (optional)
|
||||
|
Reference in New Issue
Block a user