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

19 lines
No EOL
870 B
Markdown

# 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
- [x] Middleware `requireRole` is properly implemented and tested
- [x] Dispute endpoints are secured with appropriate role checks
- [x] Integration tests verify role-based access control
- [x] Documentation of RBAC for dispute system is updated
## Related Files
- `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.