We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Q. How I can limit the access to my controller to certain roles?
Decorate your controller or actions with the annotations
Users with Admin role can access this controller/action
[Authorize(Roles="Admin")]
User with Admin OR Manager roles can access this controller/action
[Authorize(Roles="Admin, Manager")]
Users with Admin AND Manager roles can access this controller/action
[Authorize(Roles="Admin"] [Authorize(Roles="Manager"]
There was an error while loading. Please reload this page.