diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx index f1927c9a4c..7bc58c509e 100644 --- a/frontend/src/AppRoutes/index.tsx +++ b/frontend/src/AppRoutes/index.tsx @@ -147,7 +147,11 @@ function App(): JSX.Element { } } - if (isOnBasicPlan || (isLoggedInState && role && role !== 'ADMIN')) { + if ( + isOnBasicPlan || + (isLoggedInState && role && role !== 'ADMIN') || + !(isCloudUserVal || isEECloudUser()) + ) { const newRoutes = routes.filter((route) => route?.path !== ROUTES.BILLING); setRoutes(newRoutes); } diff --git a/frontend/src/container/SideNav/SideNav.tsx b/frontend/src/container/SideNav/SideNav.tsx index ac0028b89e..d11e1c158b 100644 --- a/frontend/src/container/SideNav/SideNav.tsx +++ b/frontend/src/container/SideNav/SideNav.tsx @@ -96,6 +96,8 @@ function SideNav({ const { registerShortcut, deregisterShortcut } = useKeyboardHotkeys(); + const isCloudUserVal = isCloudUser(); + useEffect(() => { if (inviteMembers) { const updatedUserManagementMenuItems = [ @@ -135,7 +137,11 @@ function SideNav({ license.isCurrent && license.planKey === LICENSE_PLAN_KEY.BASIC_PLAN, ) || licenseData?.payload?.licenses === null; - if (role !== USER_ROLES.ADMIN || isOnBasicPlan) { + if ( + role !== USER_ROLES.ADMIN || + isOnBasicPlan || + !(isCloudUserVal || isEECloudUser()) + ) { items = items.filter((item) => item.key !== ROUTES.BILLING); } @@ -214,8 +220,6 @@ function SideNav({ pathname, ]); - const isCloudUserVal = isCloudUser(); - useEffect(() => { if (isCloudUser() || isEECloudUser()) { const updatedUserManagementMenuItems = [helpSupportMenuItem];