website refactor

This commit is contained in:
2026-01-18 00:17:01 +01:00
parent 69d4cce7f1
commit 4b66c682a0
18 changed files with 847 additions and 87 deletions

View File

@@ -326,6 +326,12 @@ export const routeMatchers = {
requiresRole(path: string): string[] | null {
logger.info('[RouteConfig] requiresRole check', { path });
// Public routes never require a role
if (this.isPublic(path)) {
logger.info('[RouteConfig] Path is public, no role required', { path });
return null;
}
if (this.isInGroup(path, 'admin')) {
// Website session roles come from the API and are more specific than just "admin".
// Keep "admin"/"owner" for backwards compatibility.