Merge pull request #1209 from jbe-dw/fixADFilter

fix: Active directory filter is broken
This commit is contained in:
jbe-dw 2022-05-24 14:19:37 +02:00 committed by GitHub
commit 0f1102a07b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,7 @@ class User(db.Model):
if LDAP_USER_GROUP:
ldap_user_group = "(memberOf:1.2.840.113556.1.4.1941:={0})".format(LDAP_USER_GROUP)
searchFilter = "(&({0}={1})(|{2}{3}{4}))".format(LDAP_FILTER_USERNAME, self.username,
LDAP_FILTER_GROUP, ldap_admin_group_filter,
ldap_admin_group_filter,
ldap_operator_group, ldap_user_group)
ldap_result = self.ldap_search(searchFilter, LDAP_BASE_DN)
user_ad_member_of = ldap_result[0][0][1].get(