Files
windmill/frontend/src/lib/instanceRoutes.ts
T
Ruben FiszelandClaude Opus 5.5 a3a4fa5038 fix: let devops users reach instance pages without a workspace (#11876)
* fix: let devops users reach instance pages without a workspace

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: hide workspace-bound worker actions when no workspace is selected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: keep the page header bar in the no-workspace instance view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:09:03 +02:00

11 lines
494 B
TypeScript

/**
* Pages a devops user can open without belonging to any workspace. Devops grants no workspace
* access, so such a page renders with `$workspaceStore` and `$userStore` unset and must hide
* whatever needs them (a workspace-scoped call or a link into a workspace) rather than break.
*/
const INSTANCE_ROUTES = ['/workers', '/service_logs']
export function isInstanceRoute(pathname: string): boolean {
return INSTANCE_ROUTES.some((r) => pathname === r || pathname.startsWith(r + '/'))
}