[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 3 additions and 2 deletions
Showing only changes of commit 80f06e483b - Show all commits

View File

@ -10,7 +10,7 @@ from ldap3 import SUBTREE, MODIFY_REPLACE, MODIFY_ADD, MODIFY_DELETE
from werkzeug.exceptions import BadRequest, InternalServerError, NotFound
from flaschengeist import logger
from flaschengeist.plugins import AuthPlugin, after_role_updated
from flaschengeist.plugins import AuthPlugin, before_role_updated
from flaschengeist.models.user import User, Role, _Avatar
import flaschengeist.controller.userController as userController
@ -47,8 +47,9 @@ class AuthLDAP(AuthPlugin):
self.root_dn = config.get("root_dn", None)
self.root_secret = config.get("root_secret", None)
@after_role_updated
@before_role_updated
def _role_updated(role, new_name):
logger.debug(f"LDAP: before_role_updated called with ({role}, {new_name})")
self.__modify_role(role, new_name)
def login(self, user, password):