[auth_ldap] Fix typo in __init__

This commit is contained in:
Ferdinand Thiessen 2021-07-29 16:45:26 +02:00
parent 50ccfac565
commit ea782b40d6
1 changed files with 5 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class AuthLDAP(AuthPlugin):
# TODO: might not be set if modify is called
self.root_dn = config.get("root_dn", None)
self.root_secret = self.root_dn = config.get("root_secret", None)
self.root_secret = config.get("root_secret", None)
@after_role_updated
def _role_updated(role, new_name):
@ -219,8 +219,11 @@ class AuthLDAP(AuthPlugin):
else:
ldap_conn.delete(dn)
except (LDAPPasswordIsMandatoryError, LDAPBindError):
except LDAPPasswordIsMandatoryError:
raise BadRequest
except LDAPBindError:
logger.debug(f"Could not bind to LDAP server", exc_info=True)
raise InternalServerError
def __hash(self, password):
if self.password_hash == "ARGON2":