mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add perms for webhooks
This commit is contained in:
parent
a0abc6819b
commit
03cfdc0aa1
@ -576,6 +576,7 @@ class PanelHandler(BaseHandler):
|
|||||||
"Files": EnumPermissionsServer.FILES,
|
"Files": EnumPermissionsServer.FILES,
|
||||||
"Config": EnumPermissionsServer.CONFIG,
|
"Config": EnumPermissionsServer.CONFIG,
|
||||||
"Players": EnumPermissionsServer.PLAYERS,
|
"Players": EnumPermissionsServer.PLAYERS,
|
||||||
|
"Webhooks": EnumPermissionsServer.WEBHOOKS,
|
||||||
}
|
}
|
||||||
page_data[
|
page_data[
|
||||||
"user_permissions"
|
"user_permissions"
|
||||||
@ -749,6 +750,17 @@ class PanelHandler(BaseHandler):
|
|||||||
page_data["history_stats"] = self.controller.servers.get_history_stats(
|
page_data["history_stats"] = self.controller.servers.get_history_stats(
|
||||||
server_id, days
|
server_id, days
|
||||||
)
|
)
|
||||||
|
if subpage == "webhooks":
|
||||||
|
if (
|
||||||
|
not page_data["permissions"]["Webhooks"]
|
||||||
|
in page_data["user_permissions"]
|
||||||
|
):
|
||||||
|
if not superuser:
|
||||||
|
self.redirect(
|
||||||
|
"/panel/error?error=Unauthorized access to Webhooks Config"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
page_data[""]
|
||||||
|
|
||||||
def get_banned_players_html():
|
def get_banned_players_html():
|
||||||
banned_players = self.controller.servers.get_banned_players(server_id)
|
banned_players = self.controller.servers.get_banned_players(server_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user