[auth_ldap] Allow more configuration #14

Merged
crimsen merged 3 commits from improve_ldap into develop 2021-11-11 18:43:18 +00:00
1 changed files with 5 additions and 2 deletions
Showing only changes of commit f80ad5c420 - Show all commits

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":