feat(auth): introduce explicit planning read permission

This commit is contained in:
2026-03-30 09:15:07 +02:00
parent a50ca09333
commit 93c4374973
11 changed files with 293 additions and 11 deletions
@@ -0,0 +1,46 @@
import { ROLE_DEFAULT_PERMISSIONS, SystemRole } from "@capakraken/shared";
export const SYSTEM_ROLE_CONFIG_DEFAULTS = [
{
role: SystemRole.ADMIN,
label: "Admin",
description: "Full platform administration and security management.",
color: "purple",
sortOrder: 1,
},
{
role: SystemRole.MANAGER,
label: "Manager",
description: "Operational delivery management across resources, projects, and staffing.",
color: "blue",
sortOrder: 2,
},
{
role: SystemRole.CONTROLLER,
label: "Controller",
description: "Read-heavy planning, resource, and financial oversight.",
color: "amber",
sortOrder: 3,
},
{
role: SystemRole.USER,
label: "User",
description: "Standard authenticated access with self-service capabilities only.",
color: "gray",
sortOrder: 4,
},
{
role: SystemRole.VIEWER,
label: "Viewer",
description: "Restricted read-only access for limited observation scenarios.",
color: "gray",
sortOrder: 5,
},
] as const;
export function buildSystemRoleConfigSeedData() {
return SYSTEM_ROLE_CONFIG_DEFAULTS.map((config) => ({
...config,
defaultPermissions: ROLE_DEFAULT_PERMISSIONS[config.role],
}));
}