fix(topbar): hide tenant indicator for platform admin users
Platform admins operate across all tenants and don't belong to any specific tenant — showing 'Tenant: Not selected' was misleading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
816c5461f9
commit
c1fb39c3c0
|
|
@ -79,11 +79,13 @@ export function TopBar() {
|
|||
{/* Divider */}
|
||||
<div className="h-5 w-px bg-border" />
|
||||
|
||||
{/* Tenant indicator */}
|
||||
<div className="text-xs">
|
||||
<span className="text-muted-foreground">{t('tenant')} </span>
|
||||
<span className="font-medium">{currentTenant?.name || currentTenant?.id || t('notSelected')}</span>
|
||||
</div>
|
||||
{/* Tenant indicator — hidden for platform admins */}
|
||||
{!user?.roles?.some((r) => r === 'platform_admin' || r === 'platform_super_admin') && (
|
||||
<div className="text-xs">
|
||||
<span className="text-muted-foreground">{t('tenant')} </span>
|
||||
<span className="font-medium">{currentTenant?.name || currentTenant?.id || t('notSelected')}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* User avatar + dropdown */}
|
||||
<div className="relative" ref={menuRef}>
|
||||
|
|
|
|||
Loading…
Reference in New Issue