Infrastructure medium complexity backend
0
Dependencies
0
Dependents
3
Entities
0
Integrations

Description

Supabase Edge Function that intercepts administrative write operations and appends immutable audit entries to the audit store. Executes server-side to prevent client-side tampering of audit records. Triggered on user role changes, deactivations, and settings mutations.

Feature: Admin Portal

admin-audit-edge-function

Responsibilities

  • Capture actor, timestamp, action type, and before/after state for each admin mutation
  • Write immutable audit entries server-side via Supabase Edge Functions
  • Ensure audit records cannot be suppressed by client-side code

Interfaces

handleRoleChangeAudit(event)
handleUserStatusAudit(event)
handleSettingsChangeAudit(event)
formatAuditEntry(actor, action, resource, diff)