feat: add audit logging for admin trash restore/purge and notification clear actions

- Record audit events in `admin_trash_restore` and `admin_trash_purge` endpoints with target metadata
- Log `notification.read.all` event when user clears devRant notification feed
- Include `devrant` as a valid origin in audit categories
- Add `admin_section` and `pagination_query` fields to audit and backup schemas for UI consistency
This commit is contained in:
2026-06-16 05:08:58 +00:00
parent 1934dd5727
commit 99ed5c4f15
24 changed files with 466 additions and 186 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ CATEGORY_BY_PREFIX: dict[str, str] = {
EVENT_RESULTS = ("success", "failure", "denied")
ACTOR_KINDS = ("user", "guest", "system", "cli", "service")
ORIGINS = ("web", "api", "devii", "cli", "service", "scheduler")
ORIGINS = ("web", "api", "devii", "cli", "service", "scheduler", "devrant")
def category_for(event_key: str) -> str: