feat(audit): filterable audit log page under Settings

The audit trail existed only as a summary card — no table, no filters.
The list endpoint was also self-scoped and never returned user_email
(the field existed on the struct but was never selected).

Backend: GET /audit-logs now joins users for email and accepts
user_id / actor (email ILIKE) / since (RFC3339) filters alongside the
existing resource/action/page/limit. Widening past self-scope matches
the platform's no-roles trust model — every authed user can already
create users. RLS on audit_logs is dormant (superuser connection,
app.current_user_id never set).

Frontend: /settings/audit-logs page with deferred filter inputs, time
range select, paginated table (time, actor, resource, action, id, IP,
details), linked from a Settings card. Spec updated and types
regenerated.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-17 16:36:05 +02:00
1 parent e127c62b0f
commit 2bfa683084
8 files changed
+337 -23

No files matched your search

+21 -1
View File
@@ -827,7 +827,7 @@ paths:
tags:
- Audit
summary: List audit logs
description: Retrieve recent audit log entries for the current user with optional filters
description: Retrieve audit log entries with optional filters
security:
- bearerAuth: []
parameters:
@@ -837,6 +837,26 @@ paths:
description: Filter audit logs by resource type
schema:
type: string
- name: actor
in: query
required: false
description: Filter audit logs by actor email substring
schema:
type: string
- name: user_id
in: query
required: false
description: Filter audit logs by actor user UUID
schema:
type: string
format: uuid
- name: since
in: query
required: false
description: Only return entries created at or after this RFC3339 timestamp
schema:
type: string
format: date-time
- name: action
in: query
required: false