Applied RBAC to compliance dashboard

This commit is contained in:
2026-10-22 16:06:05 +02:00
parent efc63ca398
commit 3fda1ac5db
2 changed files with 8 additions and 1 deletions
@@ -6,7 +6,7 @@ export const LOCAL_STORAGE_SYSTEM_ROLES_KEY = 'pfm_cache_system_roles';
export const LOCAL_STORAGE_ROLE_CLAIMS_PREFIX = 'pfm_cache_role_claims_';
export const LOCAL_STORAGE_SYSTEM_CLAIMS_KEY = 'pfm_cache_system_claims';
export const LOCAL_STORAGE_RBAC_VERSION_KEY = 'pfm_rbac_cache_version';
export const CURRENT_RBAC_CACHE_VERSION = 'v2.1';
export const CURRENT_RBAC_CACHE_VERSION = 'v2.2';
/**
* Invalidates and purges legacy cached claims if the schema version differs.
@@ -55,6 +55,7 @@ export const DEFAULT_ROLE_CLAIMS: Record<string, Claim[]> = {
],
supervisor: [
{ claimId: 20, claimType: 'dashboard', claimValue: 'view, export' },
{ claimId: 38, claimType: 'compliance', claimValue: 'view, export' },
{ claimId: 21, claimType: 'projects_milestones', claimValue: 'view, add, update, export' },
{ claimId: 22, claimType: 'grant_financials', claimValue: 'view, add, update, export' },
{ claimId: 23, claimType: 'evidence_risks', claimValue: 'view, add, update, export' },
@@ -66,6 +67,7 @@ export const DEFAULT_ROLE_CLAIMS: Record<string, Claim[]> = {
],
manager: [
{ claimId: 10, claimType: 'dashboard', claimValue: 'all' },
{ claimId: 39, claimType: 'compliance', claimValue: 'all' },
{ claimId: 11, claimType: 'projects_milestones', claimValue: 'all' },
{ claimId: 12, claimType: 'grant_financials', claimValue: 'all' },
{ claimId: 13, claimType: 'evidence_risks', claimValue: 'all' },
@@ -80,6 +82,7 @@ export const DEFAULT_ROLE_CLAIMS: Record<string, Claim[]> = {
],
executive: [
{ claimId: 1, claimType: 'dashboard', claimValue: 'all' },
{ claimId: 40, claimType: 'compliance', claimValue: 'all' },
{ claimId: 2, claimType: 'governance', claimValue: 'all' },
{ claimId: 3, claimType: 'projects_milestones', claimValue: 'all' },
{ claimId: 4, claimType: 'grant_financials', claimValue: 'all' },