what even

This commit is contained in:
cazagen 2019-11-12 00:00:30 +00:00
parent 2dc23384f3
commit bc46e38420

View File

@ -67,7 +67,7 @@ class LDAPUserManager(FilebasedUserManager,
self._logger.error("wassup") self._logger.error("wassup")
self._logger.error(str(data)) self._logger.error(str(data))
for group in self.ldapify_groups(self,LDAP_GROUPS): for group in self.ldapifyf_groups(self,LDAP_GROUPS):
if group in data.get('memberOf', []): if group in data.get('memberOf', []):
user = FilebasedUserManager.findUser(self, username) user = FilebasedUserManager.findUser(self, username)
if not user: if not user:
@ -96,11 +96,11 @@ class LDAPUserManager(FilebasedUserManager,
return FilebasedUserManager.changeUserPassword(self, username, password) return FilebasedUserManager.changeUserPassword(self, username, password)
def findUser(self, userid=None, apikey=None, session=None): def findUser(self, userid=None, apikey=None, session=None):
self._logger.error("CAMERON 1")
local_user = FilebasedUserManager.findUser(self, userid, apikey, session) local_user = FilebasedUserManager.findUser(self, userid, apikey, session)
#If user not exists in local database, search it on LDAP #If user not exists in local database, search it on LDAP
if userid and not local_user: if userid and not local_user:
#Return a fake user instance #Return a fake user instance
self._logger.error("CAMERON 1")
return User(userid, str(uuid.uuid4()), True, ["user"]) return User(userid, str(uuid.uuid4()), True, ["user"])
else : else :