Allow to use full DN as value for member attribute instead of member: username (#8969)

Allow to use full DN as value for member attribute instead of member: username

I dont use LDAP so this should be tested with both methods.

For using fulldn as user `$config['ldap_auth_userdn'] = true;` must be set in config.php

This comes from https://community.librenms.org/t/feature-request-full-dn-as-group-member-attibute-in-ldap-auth/4805

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [ x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
TheGreatDoc
2018-08-05 14:52:54 +02:00
committed by Neil Lathwood
parent 50bb72f530
commit 979f811ea9
3 changed files with 23 additions and 7 deletions

View File

@@ -647,6 +647,8 @@ $config['auth_ldap_groupmemberattr'] = 'memberUid';
$config['auth_ldap_emailattr'] = 'mail';
$config['auth_ldap_cache_ttl'] = 300;
// How long in seconds should ldap* module cache user information in $_SESSION
$config['auth_ldap_userdn'] = false;
// 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).
// Active Directory Authentication
$config['auth_ad_user_filter'] = "(objectclass=user)";