2026-03-17 02:06:44 +00:00
|
|
|
## Issue Description
|
2026-03-16 12:06:33 +00:00
|
|
|
|
2026-03-17 02:06:44 +00:00
|
|
|
This issue tracks the implementation of role-based access control (RBAC) for the helpyourneighbour project.
|
2026-03-16 12:06:33 +00:00
|
|
|
|
2026-03-17 02:06:44 +00:00
|
|
|
## Acceptance Criteria
|
2026-03-16 12:06:33 +00:00
|
|
|
|
2026-03-17 02:06:44 +00:00
|
|
|
- [ ] Role middleware is implemented and tested
|
|
|
|
|
- [ ] All routes are properly protected by role checks
|
|
|
|
|
- [ ] Audit logging is implemented for sensitive actions
|
|
|
|
|
- [ ] Documentation is updated with the new RBAC implementation
|
2026-03-16 12:06:33 +00:00
|
|
|
|
2026-03-17 02:06:44 +00:00
|
|
|
## Tasks
|
2026-03-16 23:06:42 +00:00
|
|
|
|
2026-03-17 02:06:44 +00:00
|
|
|
1. Implement role middleware in `backend/middleware/role.middleware.js`
|
|
|
|
|
2. Create tests for role middleware in `backend/tests/roles.test.js`
|
|
|
|
|
3. Update existing routes to use role middleware
|
|
|
|
|
4. Add audit logging for sensitive actions
|
|
|
|
|
5. Update documentation in `docs/roles-and-permissions.md`
|
|
|
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
|
|
This issue is a follow-up to the discussion in #42 and aims to implement the role-based access control system as described in the documentation.
|