From a192ea0caa9e13caea71e6933b2f3df6d10a7082 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 1 Mar 2023 14:48:10 +0000 Subject: [PATCH] Only allow admins to access audit logs --- packages/builder/src/stores/portal/menu.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/stores/portal/menu.js b/packages/builder/src/stores/portal/menu.js index 56956fc330..3ffb62d881 100644 --- a/packages/builder/src/stores/portal/menu.js +++ b/packages/builder/src/stores/portal/menu.js @@ -75,11 +75,15 @@ export const menu = derived([admin, auth], ([$admin, $auth]) => { title: "Usage", href: "/builder/portal/account/usage", }, - { - title: "Audit Logs", - href: "/builder/portal/account/auditLogs", - }, + ] + if ($auth.isAdmin) { + accountSubPages.push( + { + title: "Audit Logs", + href: "/builder/portal/account/auditLogs", + }) + } if ($admin.cloud && $auth?.user?.accountPortalAccess) { accountSubPages.push({ title: "Upgrade",