Skip to content

Add the admin API for feedback and the audit log (W6-07) - #152

Merged
calebyhan merged 1 commit into
mainfrom
141/admin-api-feedback-audit-log
Nov 16, 2026
Merged

calebyhan merged 1 commit into
mainfrom
141/admin-api-feedback-audit-log

Conversation

@emlijon

@emlijon emlijon commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Coordinators need a secure way to review anonymous Contact page feedback and inspect sensitive staff actions. These changes expose the existing feedback and audit-log data through coordinator-only admin APIs while preserving anonymity and excluding sensitive audit metadata.

Changes:

  • Added coordinator-only feedback endpoints to list submissions, filter by unread status, and mark feedback as read or unread.
  • Added feedback deletion with an audit entry that contains the feedback ID but never its text.
  • Added a paginated audit-log endpoint with action and actor filters.
  • Joined audit entries to accounts in one query so actor display names are returned without N+1 queries, while deleted or unavailable actors return null.
  • Added DTOs that expose only the required fields, including date-only feedback creation dates and no audit metadata.
  • Added authorization, filtering, pagination, ordering, read-state, deletion-audit, and missing-actor tests.

Closes #141

@github-actions

Copy link
Copy Markdown

Backend Test Results

645 tests  +6   645 ✅ +6   19s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 3237857. ± Comparison against base commit 4cc4d65.

@calebyhan calebyhan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calebyhan
calebyhan merged commit cf9d5fa into main Nov 16, 2026
4 checks passed
@calebyhan
calebyhan deleted the 141/admin-api-feedback-audit-log branch November 16, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the admin API for feedback and the audit log (W6-07)

2 participants