feat: implement role-based access control for API endpoints
This commit is contained in:
parent
08f3afd062
commit
09ce8929c8
1 changed files with 18 additions and 0 deletions
18
issue_123.md
Normal file
18
issue_123.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# 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 routes. This includes implementing middleware to check user roles and updating existing routes to use this middleware.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [x] Middleware `requireRole` is implemented and tested
|
||||
- [x] All existing API routes are updated to use the `requireRole` middleware where necessary
|
||||
- [x] New API endpoints are protected with appropriate role checks
|
||||
- [x] Documentation of RBAC in `docs/roles-and-permissions.md` is updated
|
||||
|
||||
## Related Files
|
||||
- `backend/middleware/role.middleware.js`
|
||||
- `backend/controllers/`
|
||||
- `backend/routes/`
|
||||
|
||||
## Notes
|
||||
This task builds upon the existing roles and permissions documentation. The implementation should follow the principles outlined in the documentation.
|
||||
Loading…
Add table
Add a link
Reference in a new issue