Solutionunvalidated
Implement role-based authorization as a reusable dependency (e.g., a callable class used with Depends) that loads the current user from the token and raises HTTP 403 when the user's role is not in the allowed roles; apply the dependency to routes.
8ac2732d-3578-4640-866b-8c4392caed56
Implement role-based authorization as a reusable dependency (e.g., a callable class used with Depends) that loads the current user from the token and raises HTTP 403 when the user's role is not in the allowed roles; apply the dependency to routes.