Revert "fixed install of permission users_register"

This reverts commit fee4765898.
This commit is contained in:
Tim Gröger 2021-01-22 14:24:12 +01:00
parent fee4765898
commit 83dba12ecb
1 changed files with 2 additions and 13 deletions

View File

@ -25,15 +25,7 @@ _permission_register = "users_register"
class UsersPlugin(Plugin): class UsersPlugin(Plugin):
def __init__(self, cfg): def __init__(self, cfg):
super().__init__( super().__init__(blueprint=users_bp, permissions=[_permission_edit, _permission_delete, _permission_set_roles])
blueprint=users_bp,
permissions=[
_permission_edit,
_permission_delete,
_permission_set_roles,
_permission_register,
],
)
@users_bp.route("/users", methods=["POST"]) @users_bp.route("/users", methods=["POST"])
@ -122,10 +114,7 @@ def get_avatar(userid):
@login_required() @login_required()
def set_avatar(userid, current_session): def set_avatar(userid, current_session):
user = userController.get_user(userid) user = userController.get_user(userid)
if ( if userid != current_session._user.userid and not current_session._user.has_permission(_permission_edit):
userid != current_session._user.userid
and not current_session._user.has_permission(_permission_edit)
):
raise Forbidden raise Forbidden
file = request.files.get("file") file = request.files.get("file")