feature/migrations, closes #19 #20
|
@ -61,7 +61,7 @@ class AuthLDAP(AuthPlugin):
|
||||||
def login(self, login_name, password):
|
def login(self, login_name, password):
|
||||||
if not login_name:
|
if not login_name:
|
||||||
return False
|
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:
|
def user_exists(self, userid) -> bool:
|
||||||
attr = self.__find(userid, None)
|
attr = self.__find(userid, None)
|
||||||
|
@ -306,3 +306,5 @@ class AuthLDAP(AuthPlugin):
|
||||||
|
|
||||||
except (LDAPPasswordIsMandatoryError, LDAPBindError):
|
except (LDAPPasswordIsMandatoryError, LDAPBindError):
|
||||||
raise BadRequest
|
raise BadRequest
|
||||||
|
except IndexError as e:
|
||||||
|
logger.error("Roles in LDAP", exc_info=True)
|
||||||
|
|
Loading…
Reference in New Issue