add bundler stuff

This commit is contained in:
2026-07-08 16:59:00 -04:00
parent 2a5fbffaa2
commit ba3d87c27f
12 changed files with 425 additions and 70 deletions

13
web/auth/permissions.ts Normal file
View File

@@ -0,0 +1,13 @@
// Generic permission check shared by the framework. The permission CONSTANTS
// (P_APP_*, P_ORG_*, ...) are application-specific and live app-side; only this
// membership test is generic. "*" (P_ALL) grants everything.
export const P_ALL = "*";
export function hasPermission(
permissions: string[] | null | undefined,
permission: string,
): boolean {
if (!permissions) return false;
if (permissions.includes(P_ALL)) return true;
return permissions.includes(permission);
}