2.7 KiB
2.7 KiB
Route Access Matrix
Date: 2026-03-30
Purpose: Make high-sensitivity API audiences explicit and reduce ambiguous protectedProcedure usage on broad read routes.
Audience Classes
self-service: authenticated users can only read or mutate data that belongs to their linked resource or accountauthenticated-safe-lookup: authenticated users can access a deliberately narrow, identity-safe lookup surfaceresource-overview: users withviewAllResourcesormanageResourcesplanning-read: users with at least one ofviewCosts,manageProjects, ormanageAllocationscontroller-finance: controller, manager, or admin throughcontrollerProceduremanager-write: manager or admin throughmanagerProcedureadmin-only: admin throughadminProcedure
Current Classification
packages/api/src/router/resource.ts
getMyResource:self-servicegetById,getByEid,getHoverCard,getByIdentifier,getByIdentifierDetail,resolveByIdentifier,getChargeabilitySummary:self-serviceunless the caller also hasresource-overviewdirectory:authenticated-safe-lookuplistSummaries,listSummariesDetail,listStaff,resolveResponsiblePersonName:resource-overviewgetSkillsAnalytics,searchBySkills,listWithUtilization,getChargeabilityStats,getSkillMarketplace:controller-finance- create, update, deactivate, batch update, imports for other users:
manager-writeoradmin-only
packages/api/src/router/project.ts
resolveByIdentifier,searchSummaries,getByIdentifier:planning-readsearchSummariesDetail,list,getById,getByIdentifierDetail,getShoringRatio,listWithCosts:controller-finance- create, update, status changes, cover mutations:
manager-write - delete and batch delete:
admin-only isImageGenConfigured,isDalleConfigured: authenticated low-risk configuration checks
packages/api/src/router/timeline.ts
getMyEntriesView,getMyHolidayOverlays:self-service- timeline-wide planning reads and shift previews:
controller-finance - allocation updates, quick-assign, project shifts:
manager-write
packages/api/src/router/allocation.ts
- broad planning and staffing reads should move from generic
protectedProcedureto explicitplanning-reador narrower follow-up audiences - mutations already sit behind
manager-write
packages/api/src/router/dashboard.ts
- all current routes are
controller-finance
Immediate Follow-Ups
- reclassify
allocationread endpoints away from genericprotectedProcedure - introduce a dedicated project-read permission instead of the current interim
planning-readcomposite - add authorization tests for every route listed above so the matrix is CI-enforced, not just documented