The admin CRUD surface (merged to main at c4e0c4c) added write endpoints for controlled vocabularies, terms, and authority records:
POST /api/admin/vocabularies → db::vocab::create_vocabulary
POST /api/admin/vocabularies/{id}/terms → db::vocab::add_term
POST /api/admin/authorities → db::authority::create_authority
Unlike catalogue object writes (which now record AuditActor::User(<real uuid>)), these three creation paths are not audited — the underlying db functions take no AuditActor argument, 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
Add an AuditActor parameter to db::vocab::create_vocabulary / add_term and db::authority::create_authority.
Record an audit entry on each (consistent with how object/user writes are audited).
Thread the authenticated user (actor(&auth.user)) through the three admin handlers in crates/api/src/admin_vocab.rs and crates/api/src/admin_authorities.rs.
Acceptance
Creating a vocabulary, term, or authority via the admin API writes an audit entry attributing the real acting user.
Existing tests stay green; add coverage asserting the audit row is written.
## Context
The admin CRUD surface (merged to `main` at `c4e0c4c`) added write endpoints for controlled vocabularies, terms, and authority records:
- `POST /api/admin/vocabularies` → `db::vocab::create_vocabulary`
- `POST /api/admin/vocabularies/{id}/terms` → `db::vocab::add_term`
- `POST /api/admin/authorities` → `db::authority::create_authority`
Unlike catalogue **object** writes (which now record `AuditActor::User(<real uuid>)`), these three creation paths are **not audited** — the underlying `db` functions take no `AuditActor` argument, 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
- Add an `AuditActor` parameter to `db::vocab::create_vocabulary` / `add_term` and `db::authority::create_authority`.
- Record an audit entry on each (consistent with how object/user writes are audited).
- Thread the authenticated user (`actor(&auth.user)`) through the three admin handlers in `crates/api/src/admin_vocab.rs` and `crates/api/src/admin_authorities.rs`.
## Acceptance
- Creating a vocabulary, term, or authority via the admin API writes an audit entry attributing the real acting user.
- Existing tests stay green; add coverage asserting the audit row is written.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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