role_required decorator alongside token_required in api/decorators/token_required.py for role-based access control.
The role_required decorator
Protecting a route by role
@token_required first to authenticate, then @role_required to check the role.
Implementing role validation
Add your role-checking logic in thewrapped function. A typical pattern with JWT claims: