Skip to content

Audit log: who did what, when #26

Description

@MrImmortal09

Context

Every privileged action (role change, report resolution, user ban, event edit, email change) should be auditable. This is both a security and a trust feature.

Acceptance criteria

  • AuditLog model: { id, actorId, action, targetType, targetId, diff (json), ip, userAgent, createdAt }
  • Helper logAudit(...) called from every mutation in /admin
  • /admin/audit read-only table viewable by superadmin only
  • Entries are append-only (no delete), retained for 2 years

Depends on #7.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backendServer / database / API workpriority:mediumMedium priorityprivacyUser data, visibility, consent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions