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.