Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role-Based Access #48

Open
ArslanKamchybekov opened this issue Oct 27, 2024 · 0 comments
Open

Role-Based Access #48

ArslanKamchybekov opened this issue Oct 27, 2024 · 0 comments
Assignees

Comments

@ArslanKamchybekov
Copy link
Collaborator

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').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants