Audit vocabulary/term/authority creation (admin writes currently unaudited) #21
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 admin CRUD surface (merged to
mainatc4e0c4c) added write endpoints for controlled vocabularies, terms, and authority records:POST /api/admin/vocabularies→db::vocab::create_vocabularyPOST /api/admin/vocabularies/{id}/terms→db::vocab::add_termPOST /api/admin/authorities→db::authority::create_authorityUnlike catalogue object writes (which now record
AuditActor::User(<real uuid>)), these three creation paths are not audited — the underlyingdbfunctions take noAuditActorargument, so there is no audit path to thread a user through.This was a deliberate, documented MVP deferral (see
docs/plans/2026-06-02-admin-crud.md→ "Notes for follow-on plans"), not an oversight.Task
AuditActorparameter todb::vocab::create_vocabulary/add_termanddb::authority::create_authority.actor(&auth.user)) through the three admin handlers incrates/api/src/admin_vocab.rsandcrates/api/src/admin_authorities.rs.Acceptance