From 4e2ef4a22f5fde87202905c4f5ada0db76b4cc6d Mon Sep 17 00:00:00 2001 From: abednarik Date: Wed, 25 Apr 2018 11:55:12 -0300 Subject: [PATCH] Made account name configurable --- configuration/ldap_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/ldap_config.py b/configuration/ldap_config.py index c7e0d3b..6b0e0e7 100644 --- a/configuration/ldap_config.py +++ b/configuration/ldap_config.py @@ -22,7 +22,7 @@ LDAP_IGNORE_CERT_ERRORS = os.environ.get('LDAP_IGNORE_CERT_ERRORS', 'False').low AUTH_LDAP_USER_SEARCH = LDAPSearch(os.environ.get('AUTH_LDAP_USER_SEARCH_BASEDN', ''), ldap.SCOPE_SUBTREE, - "(sAMAccountName=%(user)s)") + "(sAMAccountName=%(os.environ.get('AUTH_LDAP_USER_SEARCH_FILTER', 'user'))s)") # This search ought to return all groups to which the user belongs. django_auth_ldap uses this to determine group # heirarchy.