Skip to content

Commit 7a345ec

Browse files
authored
feat: Add isTeamAdmin to useWorkspaceAuthorization hook in Sidebar component (#8389)
1 parent bb819ba commit 7a345ec

File tree

1 file changed

+2
-2
lines changed
  • packages/app/src/app/pages/Dashboard/Sidebar

1 file changed

+2
-2
lines changed

packages/app/src/app/pages/Dashboard/Sidebar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
8181
const teamDataLoaded = dashboard.teams.length > 0 && activeTeamInfo;
8282
const showRespositories = !state.environment.isOnPrem;
8383

84-
const { isPrimarySpace } = useWorkspaceAuthorization();
84+
const { isPrimarySpace, isTeamAdmin } = useWorkspaceAuthorization();
8585
const { isFree } = useWorkspaceSubscription();
8686

8787
const showTemplates = state.activeTeam
@@ -172,7 +172,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
172172
path={dashboardUrls.portalVMUsage(activeTeam)}
173173
icon="coins"
174174
/>
175-
{isFree && (
175+
{isFree && isTeamAdmin && (
176176
<RowItem
177177
name="Upgrade"
178178
page="external"

0 commit comments

Comments
 (0)