HOLY SHIRT IT ACTUALLY FORKING WORKS

This commit is contained in:
cazagen 2019-11-12 00:07:32 +00:00
parent c29142150a
commit 6ab399d664

View File

@ -34,7 +34,6 @@ class LDAPUserManager(FilebasedUserManager,
def check_auth(self, username, password):
self._logger.error("CAMERON 2")
if username in [None, ''] or password in [None, '']:
return None
ldap_conn = ldap3.Connection(LDAP_SERVER, auto_bind=ldap3.AUTO_BIND_TLS_BEFORE_BIND)
@ -64,8 +63,6 @@ class LDAPUserManager(FilebasedUserManager,
#connection.unbind_s()
data = self.check_auth(username, password)
self._logger.error("wassup")
self._logger.error(str(data))
for group in self.ldapify_groups(LDAP_GROUPS):
if group in data.get('memberOf', []):
@ -73,7 +70,6 @@ class LDAPUserManager(FilebasedUserManager,
if not user:
self._logger.debug("Add new user")
self.addUser(username, str(uuid.uuid4()), True)
self._logger.error("LDAP-CAMERON: HELLO BEN")
return True
else:
self._logger.error("LDAP-CAMERON: user or password incorrect.")
@ -96,7 +92,6 @@ class LDAPUserManager(FilebasedUserManager,
return FilebasedUserManager.changeUserPassword(self, username, password)
def findUser(self, userid=None, apikey=None, session=None):
self._logger.error("CAMERON 1")
local_user = FilebasedUserManager.findUser(self, userid, apikey, session)
#If user not exists in local database, search it on LDAP
if userid and not local_user: