From 0a719d9de099341be6b8c38707198f6f0cc0273f Mon Sep 17 00:00:00 2001 From: zbigniew sobiecki Date: Fri, 6 Mar 2026 15:07:13 +0100 Subject: [PATCH] fix(dashboard): show org switcher for superadmin users The org switcher was only checking for role === 'admin', missing 'superadmin' users. This caused superadmins to lose the ability to switch between organizations in the dashboard. Co-Authored-By: Claude Opus 4.5 --- web/src/lib/org-context.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/lib/org-context.tsx b/web/src/lib/org-context.tsx index 146fd979..54cde194 100644 --- a/web/src/lib/org-context.tsx +++ b/web/src/lib/org-context.tsx @@ -30,7 +30,7 @@ export function OrgProvider({ me, }: { children: React.ReactNode; me: MeData | undefined }) { const [effectiveOrgId, setEffectiveOrgId] = useState(null); - const isAdmin = me?.role === 'admin'; + const isAdmin = me?.role === 'admin' || me?.role === 'superadmin'; const initialized = useRef(false); // Initialize from me data + localStorage