mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-29 08:04:53 +00:00
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:
1 parent
e127c62b0f
commit
2bfa683084
8 files changed
+337
-23
No files matched your search
@@ -1202,13 +1202,19 @@ export interface paths {
|
||||
};
|
||||
/**
|
||||
* List audit logs
|
||||
* @description Retrieve recent audit log entries for the current user with optional filters
|
||||
* @description Retrieve audit log entries with optional filters
|
||||
*/
|
||||
get: {
|
||||
parameters: {
|
||||
query?: {
|
||||
/** @description Filter audit logs by resource type */
|
||||
resource?: string;
|
||||
/** @description Filter audit logs by actor email substring */
|
||||
actor?: string;
|
||||
/** @description Filter audit logs by actor user UUID */
|
||||
user_id?: string;
|
||||
/** @description Only return entries created at or after this RFC3339 timestamp */
|
||||
since?: string;
|
||||
/** @description Filter audit logs by action type */
|
||||
action?: string;
|
||||
/** @description 1-based page number */
|
||||
|
||||
Reference in new issue
Block a user