mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-31 21:06:10 +01:00
Fix general user can view any api-key page
This commit is contained in:
parent
72f97e4ff0
commit
37765dbebc
@ -1058,6 +1058,9 @@ class PanelHandler(BaseHandler):
|
|||||||
if user_id is None:
|
if user_id is None:
|
||||||
self.redirect("/panel/error?error=Invalid User ID")
|
self.redirect("/panel/error?error=Invalid User ID")
|
||||||
return
|
return
|
||||||
|
if user_id != exec_user["user_id"] or not exec_user["superuser"]:
|
||||||
|
self.redirect("/panel/error?error=Invalid User ID")
|
||||||
|
return
|
||||||
|
|
||||||
template = "panel/panel_edit_user_apikeys.html"
|
template = "panel/panel_edit_user_apikeys.html"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user