fix: Active directory filter is broken

This commit is contained in:
Jérôme BECOT 2022-05-24 13:58:45 +02:00
parent 259bd0a906
commit 88df88f30b
No known key found for this signature in database
GPG Key ID: 6667C39A7C2DBD6F

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(