helpyourneighbour/ISSUE-10.md

19 lines
870 B
Markdown
Raw Normal View History

# Issue: Implement Role-Based Access Control (RBAC) for Dispute Endpoints
2026-03-19 18:07:49 +00:00
## 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.
2026-03-19 18:07:49 +00:00
## 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
2026-03-19 18:07:49 +00:00
## Related Files
- `backend/src/middleware/requireRole.js`
- `backend/src/controllers/dispute.controller.js`
- `backend/src/routes/disputes.routes.js`
- `backend/test/roles.test.js`
2026-03-19 18:07:49 +00:00
## Notes
This task builds upon the existing roles and permissions documentation to enforce access control at the API level.