From 83dba12ecb262842882c7dd1d32739ca2f4153f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 22 Jan 2021 14:24:12 +0100 Subject: [PATCH] Revert "fixed install of permission users_register" This reverts commit fee476589871c5374afa6e030ae5be03e9575f35. --- flaschengeist/plugins/users/__init__.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/flaschengeist/plugins/users/__init__.py b/flaschengeist/plugins/users/__init__.py index fb04d93..f5ed33d 100644 --- a/flaschengeist/plugins/users/__init__.py +++ b/flaschengeist/plugins/users/__init__.py @@ -25,15 +25,7 @@ _permission_register = "users_register" class UsersPlugin(Plugin): def __init__(self, cfg): - super().__init__( - blueprint=users_bp, - permissions=[ - _permission_edit, - _permission_delete, - _permission_set_roles, - _permission_register, - ], - ) + super().__init__(blueprint=users_bp, permissions=[_permission_edit, _permission_delete, _permission_set_roles]) @users_bp.route("/users", methods=["POST"]) @@ -122,10 +114,7 @@ def get_avatar(userid): @login_required() def set_avatar(userid, current_session): user = userController.get_user(userid) - if ( - userid != current_session._user.userid - and not current_session._user.has_permission(_permission_edit) - ): + if userid != current_session._user.userid and not current_session._user.has_permission(_permission_edit): raise Forbidden file = request.files.get("file")