You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Decision] Permission model for duty review in the open edition — field-level write grant, platform action, or hook? #130
Part of #127 (A — permissions in the open edition). Decision card — not dispatchable until ruled.
The question
#116 was ruled "D — demo-usable is the bar" on 2026-09-02, with the open question deferred: in a real deployment, which permission model lets a reviewer approve a duty (review_status → approved / returned) without being able to rewrite its cadence, owner or catalog link? The object-level edit bit cannot distinguish the two. Under the template positioning the bar moves from "demo" to "a customer installs it and the permissions are right", so the deferred question is now on the path.
Governing text: docs/product/design-principles.md §8 (managers have exactly one write action: assign — review is the one addition #107 made); docs/deployment/security.md; ADR-0057 depth scopes (resolved only by @objectstack/security-enterprise; open edition is owner-only).
Options
Option
What it takes
Trade-off
A
Keep D: review_status is an ordinary field write; document that a reviewer can also edit cadence
nothing
honest but weak; a template ships a known hole
B
Field-level write permission on duly_duty: reviewer set may write review_status + review_note only, owner set may write everything except those two
measure first whether 17.3.0 permission sets carry field-level write grants and whether the console honours them on the edit form; then author two sets
cleanest if the platform supports it; unknown until measured
C
Approval as a platform-provided action (server-side handler flips review_status after checking the caller is the owner's manager), edit of review_status on the form removed
Seat note at 2026-11-02T06:53Z (duly lane seat, session session_011HyoSXGRy6L13mYq1Hp4n1): two measurements from the #178 card thread bear on this decision. They were taken on main94419c6, @objectstack 18.2.0, live pnpm demo; the report is in the project file duly-178-duty-provenance/step0.md.
A duly_admin can approve a duty alone. A duly_admin who is not a platform admin can write a duty naming another person as owner, then move it to to_review and approved, with both writes answering 200. The approve option's visibleWhen (record.owner != current_user.id) is satisfied because the owner is someone else. A member can create a duty with source catalog, another person as owner and a foreign business unit #178 locks owner for member and manager only, so this stays open for duly_admin. The gap is owner versus owner_id: who wrote the duty is not the person the check compares against.
The owner's confirm step is unreachable for its owner. Members and managers have no allowEdit on duly_duty, so the owner cannot move their own to_confirm duty to to_review (a PATCH to to_review answers 403). Today only an admin can move a duty past to_confirm.
Neither is changed by #178. Both depend on which permission model this card chooses.
Activity
objectstack-fleet commentedon Nov 2, 2026
Seat note at 2026-11-02T06:53Z (duly lane seat, session
session_011HyoSXGRy6L13mYq1Hp4n1): two measurements from the #178 card thread bear on this decision. They were taken onmain94419c6, @objectstack 18.2.0, livepnpm demo; the report is in the project fileduly-178-duty-provenance/step0.md.duly_admincan approve a duty alone. Aduly_adminwho is not a platform admin can write a duty naming another person as owner, then move it toto_reviewandapproved, with both writes answering 200. The approve option'svisibleWhen(record.owner != current_user.id) is satisfied because the owner is someone else. A member can create a duty with source catalog, another person as owner and a foreign business unit #178 locksownerfor member and manager only, so this stays open forduly_admin. The gap isownerversusowner_id: who wrote the duty is not the person the check compares against.allowEditonduly_duty, so the owner cannot move their ownto_confirmduty toto_review(a PATCH toto_reviewanswers 403). Today only an admin can move a duty pastto_confirm.Neither is changed by #178. Both depend on which permission model this card chooses.
Generated by Claude Code