From c00e2249c795b467079c967497e10e6a7fe82958 Mon Sep 17 00:00:00 2001
From: tabarra <1808295+tabarra@users.noreply.github.com>
Date: Sun, 13 Oct 2024 17:53:38 -0300
Subject: [PATCH] fix(core): fixed wrong permission on server log page
---
core/webroutes/serverLog.js | 2 +-
core/webroutes/serverLogPartial.js | 2 +-
panel/src/layout/ServerSidebar/ServerMenu.tsx | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/webroutes/serverLog.js b/core/webroutes/serverLog.js
index b7f40ff4d..979e61a1f 100644
--- a/core/webroutes/serverLog.js
+++ b/core/webroutes/serverLog.js
@@ -9,7 +9,7 @@ const console = consoleFactory(modulename);
*/
export default async function ServerLog(ctx) {
//Check permissions
- if (!ctx.admin.hasPermission('txadmin.log.view')) {
+ if (!ctx.admin.hasPermission('server.log.view')) {
return ctx.utils.render('main/message', { message: 'You don\'t have permission to view this page.' });
}
diff --git a/core/webroutes/serverLogPartial.js b/core/webroutes/serverLogPartial.js
index 18bf21dff..0026b5f82 100644
--- a/core/webroutes/serverLogPartial.js
+++ b/core/webroutes/serverLogPartial.js
@@ -9,7 +9,7 @@ const console = consoleFactory(modulename);
*/
export default async function ServerLogPartial(ctx) {
//Check permissions
- if (!ctx.admin.hasPermission('txadmin.log.view')) {
+ if (!ctx.admin.hasPermission('server.log.view')) {
return sendTypedResp({ error: 'You don\'t have permission to call this endpoint.' });
}
diff --git a/panel/src/layout/ServerSidebar/ServerMenu.tsx b/panel/src/layout/ServerSidebar/ServerMenu.tsx
index ff75e1457..161c52c7e 100644
--- a/panel/src/layout/ServerSidebar/ServerMenu.tsx
+++ b/panel/src/layout/ServerSidebar/ServerMenu.tsx
@@ -88,7 +88,7 @@ export default function ServerMenu() {
Resources
-
+
Server Log