Skip to content

Commit

Permalink
fix(core): fixed wrong permission on server log page
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Oct 13, 2024
1 parent 6436f47 commit c00e224
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/webroutes/serverLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.' });
}

Expand Down
2 changes: 1 addition & 1 deletion core/webroutes/serverLogPartial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.' });
}

Expand Down
2 changes: 1 addition & 1 deletion panel/src/layout/ServerSidebar/ServerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function ServerMenu() {
<MenuNavLink href="/server/resources">
<BoxIcon className="mr-2 h-4 w-4" />Resources
</MenuNavLink>
<MenuNavLink href="/server/server-log" disabled={!hasPerm('txadmin.log.view')}>
<MenuNavLink href="/server/server-log" disabled={!hasPerm('server.log.view')}>
<EyeIcon className="mr-2 h-4 w-4" />Server Log
</MenuNavLink>
<MenuNavLink href="/server/cfg-editor" disabled={!hasPerm('server.cfg.editor')}>
Expand Down

0 comments on commit c00e224

Please sign in to comment.