mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Fix any user can recieve all api keys
This commit is contained in:
parent
5bb17eae33
commit
fd0da1ef20
@ -1926,6 +1926,12 @@ class PanelHandler(BaseHandler):
|
|||||||
self.redirect("/panel/error?error=Invalid Key ID")
|
self.redirect("/panel/error?error=Invalid Key ID")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if key.user_id != exec_user["user_id"]:
|
||||||
|
self.redirect(
|
||||||
|
"/panel/error?error=You are not authorized to access this key."
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
self.controller.management.add_to_audit_log(
|
self.controller.management.add_to_audit_log(
|
||||||
exec_user["user_id"],
|
exec_user["user_id"],
|
||||||
f"Generated a new API token for the key {key.name} "
|
f"Generated a new API token for the key {key.name} "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user