feat(web): gate UI affordances on the permission matrix #70
No reviewers
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app!70
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/web-affordances-from-matrix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First part of #61: the web now derives every create/manage affordance from the permission matrix instead of a coarse
canEditflag.Removes
canEdit = ADMIN || MEMBERfrom the auth context. Adds a permission store (web/src/auth/permissions.ts) that readsSystemService.GetPermissionMatrix(from #69), caches it in localStorage and hydrates synchronously so affordances never flicker, and exposescan(service, method)on the auth context. Every page now gates on the specific verb its control performs.What this fixes and changes:
MealService, child allowed) and the rota board (MealRotaService, member-only), so a child manages dishes but not the cook rota.ItemService.Create, child allowed) from the manager tier (ItemService.Delete, member-only) — a child is a taker, per ADR-0014.canEditJob = isManager || owner === me) are untouched.Canon updated:
AGENTS.mdanddocs/frontend-plan.htmlnow say affordances mirror the matrix (absent only on a real denial), replacing the old "child sees creation affordances absent entirely" wording.Still to come in #61: the event-edit flow (web) and the Android consumer + event edit.
Verified:
make checkpasses (tsc, web build, Go tests, lingui — no new strings).Part of #61.
🤖 Generated with Claude Code
Test report
Coverage: 27.7%
Updated by the check workflow · commit
64329489128d9bfc43856432948912Android test report
Updated by the android workflow · commit
6432948912