helpyourneighbour/ISSUE-12.md
J.A.R.V.I.S. 83185aea1a
Some checks are pending
Docker Test / test (push) Waiting to run
feat: implement RBAC for dispute endpoints
2026-03-20 08:07:25 +00:00

944 B

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

Description

Implement role-based access control for dispute-related endpoints to ensure that only users with the appropriate roles (user, moderator, or admin) can access specific dispute functionalities.

Acceptance Criteria

  • Dispute creation endpoint is accessible only to user role
  • Dispute status change endpoint is accessible only to moderator and admin roles
  • Dispute final decision endpoint is accessible only to admin role
  • Integration tests are added to verify the role-based access control
  • Documentation is updated to reflect the new RBAC implementation
  • backend/src/routes/disputes.js
  • backend/src/middleware/requireRole.js
  • backend/src/controllers/dispute.controller.js

Notes

This issue builds upon the existing roles and permissions defined in docs/roles-and-permissions.md.