feature/migrations, closes #19 #20

Merged
crimsen merged 28 commits from feature/migrations into develop 2023-03-02 05:37:11 +00:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit d475f3f8e2 - Show all commits

View File

@ -61,7 +61,7 @@ class AuthLDAP(AuthPlugin):
def login(self, login_name, password):
if not login_name:
return False
return self.ldap.authenticate(login_name, password, "uid", self.base_dn)
return login_name if self.ldap.authenticate(login_name, password, "uid", self.base_dn) else False
def user_exists(self, userid) -> bool:
attr = self.__find(userid, None)
@ -306,3 +306,5 @@ class AuthLDAP(AuthPlugin):
except (LDAPPasswordIsMandatoryError, LDAPBindError):
raise BadRequest
except IndexError as e:
logger.error("Roles in LDAP", exc_info=True)