Skip to content

Allow NGO staff to create, update and delete comments - #1113

Merged
idormenco merged 1 commit into
mainfrom
fix/staff-comments
Oct 14, 2026
Merged

idormenco merged 1 commit into
mainfrom
fix/staff-comments

Conversation

@idormenco

Copy link
Copy Markdown
Contributor

Summary

NGO staff got 403 when posting comments (e.g. POST /api/election-rounds/{id}/quick-reports/{id}/comments) because create/update/delete comment endpoints were restricted to NgoAdminsOnly, while listing already allowed staff.

  • Quick reports, incident reports, form submissions comments: NgoAdminsOnly → NgoAdminOrStaff on Create/Update/Delete. Create still verifies the report belongs to the user's NGO.
  • Citizen reports comments: same policy change, plus CitizenReportingNgoAdminRequirement → CitizenReportingNgoAdminOrStaffRequirement (as already used by List).
  • Update/Delete remain author-only, so staff can only edit/delete their own comments.

Test plan

  • As NGO staff, create/update/delete a comment on a quick report, incident report, form submission and citizen report
  • As NGO staff, verify updating/deleting another user's comment returns 404

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
votemonitor Ready Ready Preview Oct 14, 2026 7:39am UTC

Request Review

@idormenco
idormenco merged commit 93af41a into main Oct 14, 2026
5 checks passed
@idormenco
idormenco deleted the fix/staff-comments branch October 14, 2026 07:51

This branch was successfully deployed

1 active deployment
Preview — 7b814c56 Deployed Oct 14, 2026 by vercel[bot]
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.

1 participant