Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Authorize]
- public class MyController: Controller
- {
- [HttpGet("/products")]
- [Authorize(Roles = "Administrator")]
- public IActionResult ListProducts()
- {
- // ...
- }
- [HttpGet("/products")]
- [Authorize(Roles = "Supervisor")]
- public IActionResult ListProducts()
- {
- // ...
- }
- }
Add Comment
Please, Sign In to add comment