Skip to content

Commit a6f1b8d

Browse files
committed
Errors hidden in the sidebar unless you're an admin
1 parent c97fe88 commit a6f1b8d

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -477,15 +477,17 @@ export function SideMenu({
477477
isCollapsed={isCollapsed}
478478
/>
479479
)}
480-
<SideMenuItem
481-
name="Errors"
482-
icon={IconBugFilled}
483-
activeIconColor="text-amber-500"
484-
inactiveIconColor="text-amber-500"
485-
to={v3ErrorsPath(organization, project, environment)}
486-
data-action="errors"
487-
isCollapsed={isCollapsed}
488-
/>
480+
{(user.admin || user.isImpersonating) && (
481+
<SideMenuItem
482+
name="Errors"
483+
icon={IconBugFilled}
484+
activeIconColor="text-amber-500"
485+
inactiveIconColor="text-amber-500"
486+
to={v3ErrorsPath(organization, project, environment)}
487+
data-action="errors"
488+
isCollapsed={isCollapsed}
489+
/>
490+
)}
489491
<SideMenuItem
490492
name="Query"
491493
icon={TableCellsIcon}

0 commit comments

Comments
 (0)