Child role: backend rights for list/meal management + expose the permission matrix #56

Closed
opened 2026-08-14 07:49:29 +00:00 by nalum · 0 comments
Owner

Give the child role the backend rights to create and run the family's shared lists and meals, and expose the permission matrix so clients can gate affordances against it. The UI affordance work — making the clients actually show a child those controls — is split out to #61.

Scope (backend only)

1. Child rights on ownerless containers (done — PR #67). Lists and meals have no owner field, so there is nothing to scope a child to. Admit CHILD to the full verb set of both services, the same rights a member holds:

  • ItemListService: Create, Update, Delete, UncheckAll.
  • MealService: Create, Update, Delete, PushIngredients.

Rewards stay member-and-up (a child claims, never grants). The meal rota board (MealRotaService) is untouched. Recorded in ADR-0028, with an end-to-end integration test driving a real child token through the interceptor.

2. Expose the matrix (done — PR #69). The clients gated affordances on a hand-written canEdit flag that drifts from the server's matrix. SystemService.GetPermissionMatrix now returns the enforced matrix as reference data, so clients gate against the real thing.

Split out to #61

The UI affordance migration — the permission store, can(service, method), removing canEdit, the Meals library-vs-rota split, and the canon-doc corrections — moved to #61, which now owns all UI-honors-the-matrix work (web and Android) and consumes #69.

Known interim gap

Until #61 lands, the web still hides a child's new list and meal controls: the capability exists server-side and the matrix is exposed, but the clients have not been migrated to consume it. A child can create lists and meals through the API and any matrix-aware client, but not yet through the shipped web or Android UI.

Definition of done

  • CHILD admitted to the ItemListService and MealService verb sets (PR #67).
  • GetPermissionMatrix exposes the enforced matrix (PR #69).
  • ADR-0028 merged; integration coverage green; make check passes.
  • UI surfacing tracked in #61.
Give the child role the backend rights to create and run the family's shared lists and meals, and expose the permission matrix so clients can gate affordances against it. The UI affordance work — making the clients actually show a child those controls — is split out to #61. ### Scope (backend only) **1. Child rights on ownerless containers (done — PR #67).** Lists and meals have no owner field, so there is nothing to scope a child to. Admit CHILD to the full verb set of both services, the same rights a member holds: - `ItemListService`: Create, Update, Delete, UncheckAll. - `MealService`: Create, Update, Delete, PushIngredients. Rewards stay member-and-up (a child claims, never grants). The meal rota board (`MealRotaService`) is untouched. Recorded in ADR-0028, with an end-to-end integration test driving a real child token through the interceptor. **2. Expose the matrix (done — PR #69).** The clients gated affordances on a hand-written `canEdit` flag that drifts from the server's matrix. `SystemService.GetPermissionMatrix` now returns the enforced matrix as reference data, so clients gate against the real thing. ### Split out to #61 The UI affordance migration — the permission store, `can(service, method)`, removing `canEdit`, the Meals library-vs-rota split, and the canon-doc corrections — moved to #61, which now owns all UI-honors-the-matrix work (web and Android) and consumes #69. ### Known interim gap Until #61 lands, the web still hides a child's new list and meal controls: the capability exists server-side and the matrix is exposed, but the clients have not been migrated to consume it. A child can create lists and meals through the API and any matrix-aware client, but not yet through the shipped web or Android UI. ### Definition of done - CHILD admitted to the ItemListService and MealService verb sets (PR #67). - `GetPermissionMatrix` exposes the enforced matrix (PR #69). - ADR-0028 merged; integration coverage green; `make check` passes. - UI surfacing tracked in #61.
nalum changed title from update child role to Child role: allow list/meal creation and fix UI hiding permitted create actions 2026-08-14 11:28:42 +00:00
nalum added this to the (deleted) project 2026-08-14 12:20:29 +00:00
nalum changed title from Child role: allow list/meal creation and fix UI hiding permitted create actions to Child role: backend rights for list/meal management + expose the permission matrix 2026-08-14 14:33:17 +00:00
nalum closed this issue 2026-08-14 16:55:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eagraiclainne/app#56
No description provided.