helpyourneighbour/ISSUE-10.md
J.A.R.V.I.S. 5a61bf2dbf
Some checks are pending
Docker Test / test (push) Waiting to run
feat: add RBAC implementation for dispute endpoints
2026-03-20 00:06:46 +00:00

870 B

Issue: Implement Role-Based Access Control (RBAC) for Dispute Endpoints

Description

Implement role-based access control for dispute-related endpoints to ensure that only authorized users (moderators and admins) can perform actions like changing dispute status or making final decisions.

Acceptance Criteria

  • Middleware requireRole is properly implemented and tested
  • Dispute endpoints are secured with appropriate role checks
  • Integration tests verify role-based access control
  • Documentation of RBAC for dispute system is updated
  • backend/src/middleware/requireRole.js
  • backend/src/controllers/dispute.controller.js
  • backend/src/routes/disputes.routes.js
  • backend/test/roles.test.js

Notes

This task builds upon the existing roles and permissions documentation to enforce access control at the API level.