diff --git a/adminfront/src/features/tenants/routes/TenantListPage.tsx b/adminfront/src/features/tenants/routes/TenantListPage.tsx index 9f45a17d..b535cc9b 100644 --- a/adminfront/src/features/tenants/routes/TenantListPage.tsx +++ b/adminfront/src/features/tenants/routes/TenantListPage.tsx @@ -294,19 +294,6 @@ function TenantListPage() { }); const profileRole = normalizeAdminRole(profile?.role); - // Redirect tenant_admin ONLY if they have one or fewer manageable tenants in the list - React.useEffect(() => { - if (profile && profileRole === "tenant_admin") { - const manageableCount = profile.manageableTenants?.length ?? 0; - if ( - (manageableCount === 1 || manageableCount === 0) && - profile.tenantId - ) { - navigate(`/tenants/${profile.tenantId}`, { replace: true }); - } - } - }, [profile, profileRole, navigate]); - const query = useInfiniteQuery({ queryKey: ["tenants", "lazy"], queryFn: ({ pageParam }) => @@ -319,10 +306,7 @@ function TenantListPage() { initialPageParam: "", getNextPageParam: (lastPage) => lastPage.nextCursor || lastPage.next_cursor || undefined, - enabled: - profileRole === "super_admin" || - (profileRole === "tenant_admin" && - (profile?.manageableTenants?.length ?? 0) > 1), + enabled: profileRole === "super_admin", }); const deleteBulkMutation = useMutation({ diff --git a/adminfront/src/features/tenants/routes/TenantWorksmobilePage.tsx b/adminfront/src/features/tenants/routes/TenantWorksmobilePage.tsx index f7504d34..f0e2b41f 100644 --- a/adminfront/src/features/tenants/routes/TenantWorksmobilePage.tsx +++ b/adminfront/src/features/tenants/routes/TenantWorksmobilePage.tsx @@ -733,7 +733,10 @@ export function TenantWorksmobilePage() { {activeTab === "users" ? (