mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix logical issue in panel_handler
This commit is contained in:
parent
7a98331b1f
commit
f75286e112
@ -1138,9 +1138,13 @@ class PanelHandler(BaseHandler):
|
||||
)
|
||||
return
|
||||
if (
|
||||
self.controller.users.get_user_by_id(user_id)["manager"]
|
||||
!= exec_user["user_id"]
|
||||
) and not exec_user["superuser"]:
|
||||
(
|
||||
self.controller.users.get_user_by_id(user_id)["manager"]
|
||||
!= exec_user["user_id"]
|
||||
)
|
||||
and not exec_user["superuser"]
|
||||
and str(exec_user["user_id"]) != str(user_id)
|
||||
):
|
||||
self.redirect(
|
||||
"/panel/error?error=Unauthorized access: you cannot edit this user"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user