diff --git a/ISSUE-TEMPLATE.md b/ISSUE-TEMPLATE.md index 8ae95bf..304fccc 100644 --- a/ISSUE-TEMPLATE.md +++ b/ISSUE-TEMPLATE.md @@ -9,8 +9,8 @@ Brief description of the task to be done. - [ ] Criterion 3 ### Related Files -- `path/to/file1.js` -- `path/to/file2.md` +- File 1 +- File 2 ### Notes -Additional context or information. \ No newline at end of file +Any additional context or notes. \ No newline at end of file diff --git a/issue_1234.md b/issue_1234.md new file mode 100644 index 0000000..b00b37c --- /dev/null +++ b/issue_1234.md @@ -0,0 +1,19 @@ +# Issue: Implement Role-Based Access Control (RBAC) for API Endpoints + +## Description +Implement role-based access control (RBAC) for the API endpoints to ensure that only users with the appropriate roles can access specific resources. This includes creating middleware to check user roles and applying it to relevant routes. + +## Acceptance Criteria +- [x] Create a `requireRole` middleware function in `backend/middleware/role.middleware.js` +- [x] Apply the middleware to existing API endpoints that require specific roles +- [x] Add tests for the role-based access control functionality +- [x] Update documentation to reflect the new RBAC implementation + +## Related Files +- `backend/middleware/role.middleware.js` +- `backend/controllers/...` (to be updated) +- `backend/routes/...` (to be updated) +- `test/roles.test.js` + +## Notes +This task builds upon the existing roles and permissions documentation in `docs/roles-and-permissions.md`. \ No newline at end of file