website refactor

This commit is contained in:
2026-01-17 18:28:10 +01:00
parent 6d57f8b1ce
commit 64d9e7fd16
44 changed files with 1729 additions and 415 deletions

View File

@@ -94,9 +94,13 @@ export class WebsiteRouteManager {
public getAccessLevel(pathTemplate: string): RouteAccess {
// NOTE: `routeMatchers.isInGroup(path, 'public')` is prefix-based and will treat everything
// as public because the home route is `/`. Use `isPublic()` for correct classification.
// Check public first to ensure public routes nested under protected prefixes (e.g. /sponsor/signup)
// are correctly classified as public.
if (routeMatchers.isPublic(pathTemplate)) return 'public';
if (routeMatchers.isInGroup(pathTemplate, 'admin')) return 'admin';
if (routeMatchers.isInGroup(pathTemplate, 'sponsor')) return 'sponsor';
if (routeMatchers.isPublic(pathTemplate)) return 'public';
if (routeMatchers.requiresAuth(pathTemplate)) return 'auth';
return 'public';
}