Admin endpoint to trigger visibility transitions (publish/unpublish) #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Context
The publishing pillar (Plan 7) landed the capability to change a record's visibility —
domain::Visibility::transition_to(stepwise state machine) anddb::catalog::set_visibility(validated + audited) — but no HTTP endpoint invokes it yet. Changing visibility is a privileged write, so the trigger waits for the auth phase.What to do
When the admin/auth surface exists:
Authorized<Cap>extractor) to move an object between visibility states, callingdb::catalog::set_visibility.VisibilityError::Illegal→ 409/422,ObjectNotFound→ 404,Db→ 500.publish()/unpublish()wrappers overVisibility::transition_toindomain(omitted in Plan 7 to avoid dead code — only add them once a caller exists).References
crates/domain/src/object.rs—transition_to/IllegalTransitioncrates/db/src/catalog.rs—set_visibility/VisibilityErrordocs/plans/2026-06-02-publishing-public-api.md(Notes for follow-on plans)