Middleware to check if the user's role is authorized.
Middleware function that checks the user's role.
Middleware to check if the user's role is authorized.