fix: remove dead /server/ fallback redirect
All checks were successful
CI / build (push) Successful in 1m14s
CI / docker (push) Successful in 46s

When no org is resolved, redirect to /tenant instead of the
non-existent /server/ path. Fixes login redirect loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-11 08:39:14 +02:00
parent 6f8b84fb1a
commit 3284304c1f
2 changed files with 7 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ export function Layout() {
// Determine current org slug for server dashboard link
const currentOrg = organizations.find((o) => o.id === currentOrgId);
const serverDashboardHref = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/';
const serverDashboardHref = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '#';
// Build breadcrumbs from path
const segments = location.pathname.replace(/^\//, '').split('/').filter(Boolean);

View File

@@ -39,9 +39,12 @@ function LandingRedirect() {
return <Navigate to="/tenant" replace />;
}
// Regular user (operator/viewer) → server dashboard directly
const serverUrl = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/';
window.location.href = serverUrl;
if (currentOrg?.slug) {
window.location.href = `/t/${currentOrg.slug}/`;
return null;
}
// No org resolved yet — stay on tenant portal
return <Navigate to="/tenant" replace />;
}
export function AppRouter() {