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:
ifred16
2019-07-24 05:57:16 +02:00
committed by Tony Murray
parent 3342210067
commit 77d94a458b
2 changed files with 4 additions and 0 deletions

View File

@@ -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 = '';

View File

@@ -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. (its 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)