idip service access: take ONE credential off a restricted service (#1778) #1797
No reviewers
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss!1797
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "idip-unrestrict"
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?
Closes #1778. Stacked on #1796 (
idip-credentials-ui) — this PR's base is that branch, so its diff is only the #1778 work; once #1796 merges, retarget tomain(or I will) and it lands by push as an ordinary ticket (nolanding-pr).What changes
POST /api/v1/idip/credentials/{slug}/access/{service}/unrestrict— the service's opening set minus THIS credential, written in ONESetPolicy: no open-to-everyone window. The last opening credential is refused (409last_opening_credential) with the message naming the two ways out (open it to all members, or restrict it to another credential first) — a service never silently becomes stewards-only. Not-an-opener / open-to-all → idempotent 204. Steward-gated + logged like restrict/open.check:clientin sync);IdipCredentialsClient.unrestrictService.Proof
internal/controlapi/idip_service_unrestrict_test.go: Files {Finance, Kaumātua} → unrestrict Kaumātua → {Finance}; theIdipGateDeciderover the SAME matrix denies the Kaumātua-only holder on their next request, still admits the Finance holder, still refuses a plain member, and the row never read open (AC1); the last opener is 409 with the copy and nothing changes (AC2); idempotence + the bare-slug claim form.go test ./internal/controlapi/ ./internal/member/green.credentialsSurfacegains both editor cases (AC3); suite 148 files / 1889 tests green;vue-tscclean.Screenshots (harness
?scenario=idip, Kaumātua's detail)🤖 Generated with Claude Code
Beside `restrict` (additive) and `open` (clears everything) the credential-side door gains `POST /api/v1/idip/credentials/{slug}/access/{service}/unrestrict`: the service's opening set minus THIS credential, written in ONE SetPolicy, so stopping Kaumātua opening Files while Finance keeps it never passes through a state where every member reaches Files. The last opening credential is refused (409 last_opening_credential) with the message naming the two ways out — open it to all members, or restrict it to another credential first — so a service never silently becomes stewards-only. A credential that does not open the service, or a service open to all, is an idempotent 204; either claim form is recognised. Steward-gated and logged like the other two. OpenAPI path + regenerated client (check:client in sync); IdipCredentialsClient.unrestrictService. The S7i "who can reach it" editor's "Only credential holders — current" row gains "Stop this credential opening it" when others open the service too; the last-opener case shows the two ways out in place of the act and keeps "Open to all members" as the first. Seam tests (idip_service_unrestrict_test.go): Files {Finance, Kaumātua} → unrestrict Kaumātua → {Finance}, with the IdipGateDecider over the SAME matrix denying the Kaumātua-only holder on their next request, still admitting the Finance holder and still refusing a plain member — the row never read open; the last-opener 409 with the copy and nothing changed; idempotence and the bare-slug form. Dashboard: credentialsSurface gains both editor cases; suite 148 files / 1889 tests green; vue-tsc clean. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>9df3cbe57d54050d466054050d46609914e01a01