mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Allow super users to add roles/users
This commit is contained in:
parent
12390306fd
commit
a833a29fb7
@ -1930,7 +1930,10 @@ class PanelHandler(BaseHandler):
|
||||
)
|
||||
return
|
||||
|
||||
if not self.controller.crafty_perms.can_add_user(exec_user["user_id"]):
|
||||
if (
|
||||
not self.controller.crafty_perms.can_add_user(exec_user["user_id"])
|
||||
and not exec_user["superuser"]
|
||||
):
|
||||
self.redirect(
|
||||
"/panel/error?error=Unauthorized access: quantity limit reached"
|
||||
)
|
||||
@ -2027,7 +2030,10 @@ class PanelHandler(BaseHandler):
|
||||
"/panel/error?error=Unauthorized access: not a role editor"
|
||||
)
|
||||
return
|
||||
elif not self.controller.crafty_perms.can_add_role(exec_user["user_id"]):
|
||||
elif (
|
||||
not self.controller.crafty_perms.can_add_role(exec_user["user_id"])
|
||||
and not exec_user["superuser"]
|
||||
):
|
||||
self.redirect(
|
||||
"/panel/error?error=Unauthorized access: quantity limit reached"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user