You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task: Implement Role-Based Access Control Using @Roles Decorator
Objective:
Enhance access control by applying @Roles('admin') and/or @Roles('provider') decorators to secure specific routes in the backend. This will ensure that only users with the specified roles can access certain functions or endpoints.
Apply Role Decorators to Protected Functions
Identify the endpoints or service methods that require role-based restrictions.
Add @Roles('admin') above functions that should be accessible only by users with the admin role.
Add @Roles('provider') above functions that should be accessible only by users with the provider role.
If multiple roles can access a function, pass both roles to the decorator, e.g., @Roles('admin', 'provider').
The text was updated successfully, but these errors were encountered:
Task: Implement Role-Based Access Control Using
@Roles
DecoratorObjective:
Enhance access control by applying
@Roles('admin')
and/or@Roles('provider')
decorators to secure specific routes in the backend. This will ensure that only users with the specified roles can access certain functions or endpoints.Apply Role Decorators to Protected Functions
@Roles('admin')
above functions that should be accessible only by users with theadmin
role.@Roles('provider')
above functions that should be accessible only by users with theprovider
role.@Roles('admin', 'provider')
.The text was updated successfully, but these errors were encountered: