feat(audit): finish PMS-117 story (scaffold, middleware writer, read endpoint) #37

Closed
David wants to merge 0 commits from feat/audit-story-pms-117 into main
Owner

Closes #PMS-117

Closes #PMS-117
feat(audit): scaffold + writer middleware + read endpoint
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
02deaed317
Final story in the PMS-117 series:
- PMS-118 scaffold + router wire
- PMS-119 audit-log writer middleware. Runs after `auth_middleware` so it can pull tenant/user from `AuthState`. Classifies the HTTP method into the audit_log CHECK-constraint actions (create/update/delete) and pulls the entity_type from the URL's second path segment. Only audits *successful* mutating requests. Failures are swallowed - a bad log write must never break the request.
- PMS-120 `GET /api/v1/audit-log`. Admin-only. Paginated + filterable by user / entity / action / timestamp range. Tenant-scoped to the caller's tenant; super-admin cross-tenant support is signposted in the handler (X-Tenant-Id header) but the special-case middleware hasn't landed yet.

#PMS-118 State Done
#PMS-119 State Done
#PMS-120 State Done
vas2000-work closed this pull request 2026-05-21 02:42:59 +02:00
Some checks are pending
Create release / Create release from merged PR (pull_request) Has been skipped
Check / * (pull_request)
Required
E2E / * (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!37
No description provided.