Skip to content

Commit

Permalink
revert AUTH_LDAP_USER_SEARCH variable that was accidentally removed in
Browse files Browse the repository at this point in the history
…netbox-community#931 and change behaviour to requested features in netbox-community#471
  • Loading branch information
timrabl committed Jan 31, 2023
1 parent 38a2989 commit cb23f06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configuration/ldap/ldap_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def _import_group_type(group_type_name):
'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.

Expand Down

0 comments on commit cb23f06

Please sign in to comment.