I hate ldap

This commit is contained in:
cazagen 2019-11-11 23:18:50 +00:00
parent d483b8bddb
commit 06e421fca8

View File

@ -104,7 +104,7 @@ class LDAPUserManager(FilebasedUserManager,
query = '(&(objectClass=groupOfNames)(cn=octoprint)(member="uid=%s,ou=Accounts,ou=People,dc=edinburghhacklab,dc=com"))' % userid
self._logger.error("LDAP-AUTH QUERY:" + query)
group_result = connection.search_s(ldap_search_base, ldap.SCOPE_SUBTREE, query)
group_result = connection.search_s("ou=Groups,ou=People,dc=edinburghhacklab,dc=com", ldap.SCOPE_SUBTREE, query)
if group_result is None or len(group_result) == 0:
print("LDAP-AUTH: Group not found")