Skip to content

Implement Role-Based Access Control (RBAC) Middleware #377

Description

@ayshadogo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions