**Description:** Create an authorization middleware to restrict access by user role. **Tasks:** - [ ] Create `src/middlewares/authorize.js` that accepts allowed roles as arguments - [ ] Return `403 Forbidden` if the authenticated user's role is not in the allowed list - [ ] Apply to all admin-only routes **Acceptance Criteria:** Non-admin users receive `403` when accessing admin routes. ---
Description:
Create an authorization middleware to restrict access by user role.
Tasks:
src/middlewares/authorize.jsthat accepts allowed roles as arguments403 Forbiddenif the authenticated user's role is not in the allowed listAcceptance Criteria:
Non-admin users receive
403when accessing admin routes.