1
0
forked from baron/baron-sso

fix(adminfront): ensure tenant admin can always access their tenant even if manageable list is empty

This commit is contained in:
2026-03-04 13:58:08 +09:00
parent 2b4b40c0d9
commit 20a8a19e12
2 changed files with 5 additions and 4 deletions

View File

@@ -60,8 +60,8 @@ function AppLayout() {
icon: Building2,
});
} else if (isTenantAdmin) {
if (manageableCount === 1 && profile?.tenantId) {
// Direct link if only one tenant
if (manageableCount <= 1 && profile?.tenantId) {
// Direct link if only one (or zero in array but has tenantId) tenant
items.splice(1, 0, {
label: "ui.admin.nav.my_tenant",
to: `/tenants/${profile.tenantId}`,