feat(org-unit): scope structural reads to resource overview

This commit is contained in:
2026-03-30 10:17:57 +02:00
parent 65fe7ce04f
commit 2b514ea962
4 changed files with 166 additions and 6 deletions
+5 -4
View File
@@ -92,14 +92,15 @@ Reasoning:
### `packages/api/src/router/org-unit.ts`
- `list`, `getTree`, `resolveByIdentifier`: `authenticated-safe-lookup`
- `getByIdentifier`, `getById`: `resource-overview`
- `resolveByIdentifier`: `authenticated-safe-lookup`
- `list`, `getTree`, `getByIdentifier`, `getById`: `resource-overview`
- create, update, deactivate: `admin-only`
Reasoning:
- minimal org-unit lookups are low-risk master data
- detailed org-unit reads expose `_count.resources` and parent/child context that maps the staffing structure
- `resolveByIdentifier` stays narrow enough for low-risk lookup flows
- `list` and especially `getTree` expose the internal org hierarchy, parent links, sort order, and structure metadata, so they should not remain broad authenticated reads
- detailed org-unit reads also expose `_count.resources` and parent/child context that maps the staffing structure
## Assistant Parity Rule