From 9806ef43a364a8dcbb8c1aa8b81c1f7a5b2331f1 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Wed, 10 Jul 2024 11:41:22 -0700 Subject: [PATCH 1/2] fix admin pages showing on single user --- frontend/src/components/SettingsSidebar/index.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/SettingsSidebar/index.jsx b/frontend/src/components/SettingsSidebar/index.jsx index ee184221e9..83b311171d 100644 --- a/frontend/src/components/SettingsSidebar/index.jsx +++ b/frontend/src/components/SettingsSidebar/index.jsx @@ -290,7 +290,7 @@ const Option = ({ key={index} {...childOption} user={user} - flex={flex} + flex={childOption.flex !== undefined ? childOption.flex : flex} allowedRole={childOption.allowedRole || allowedRole} isChild={true} /> @@ -348,6 +348,7 @@ const SidebarOptions = ({ user = null, t }) => ( btnText: t("settings.users"), href: paths.settings.users(), allowedRole: ["admin", "manager"], + flex: false, }, { btnText: t("settings.workspaces"), @@ -363,6 +364,7 @@ const SidebarOptions = ({ user = null, t }) => ( btnText: t("settings.invites"), href: paths.settings.invites(), allowedRole: ["admin", "manager"], + flex: false, }, { btnText: t("settings.system"), @@ -377,7 +379,7 @@ const SidebarOptions = ({ user = null, t }) => ( href={paths.settings.agentSkills()} user={user} flex={true} - allowedRole={["admin", "manager"]} + allowedRole={["admin"]} />