Skip to content
Snippets Groups Projects
Commit 487a3423 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'core-249-ldap-allow-multiple-search-bases-for-users-and-groups' into 'master'

Support LDAPSearchUnion now used in core

See merge request !13
parents fe0bed01 55d6298a
No related branches found
No related tags found
1 merge request!13Support LDAPSearchUnion now used in core
Pipeline #2895 failed
......@@ -319,9 +319,9 @@ def mass_ldap_import():
group_dict = {obj.ldap_dn: obj for obj in group_objects}
# Guess LDAP username field from user filter
uid_field = re.search(r"([a-zA-Z]+)=%\(user\)s", backend.settings.USER_SEARCH.filterstr).group(
1
)
uid_field = re.search(
r"([a-zA-Z]+)=%\(user\)s", backend.settings.USER_SEARCH.searches[0].filterstr
).group(1)
# Synchronise user data for all found users
ldap_users = backend.settings.USER_SEARCH.execute(connection, {"user": "*"}, escape=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment