From 6f70b88972823a03d1364e5fdae7e156a5b4646d Mon Sep 17 00:00:00 2001 From: Tim Rabl <47297056+timrabl@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:58:47 +0100 Subject: [PATCH] squash commits that revert AUTH_LDAP_USER_SEARCH add missing AUTH_LDAP_USER_SEARCH, removed while modifying.... revert AUTH_LDAP_USER_SEARCH variable that was accidentally removed in #931 and change behaviour to requested features in #471 remove duplicate AUTH_LDAP_USER_SEARCH variable now and fix this finally, hopefully --- configuration/ldap/ldap_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configuration/ldap/ldap_config.py b/configuration/ldap/ldap_config.py index f5cd50c..82fad72 100644 --- a/configuration/ldap/ldap_config.py +++ b/configuration/ldap/ldap_config.py @@ -65,6 +65,10 @@ AUTH_LDAP_USER_SEARCH_FILTER: str = environ.get( 'AUTH_LDAP_USER_SEARCH_FILTER', f'({AUTH_LDAP_USER_SEARCH_ATTR}=%(user)s)' ) +AUTH_LDAP_USER_SEARCH = LDAPSearch( + AUTH_LDAP_USER_SEARCH_BASEDN, ldap.SCOPE_SUBTREE, AUTH_LDAP_USER_SEARCH_FILTER +) + # This search ought to return all groups to which the user belongs. django_auth_ldap uses this to determine group # heirarchy.