Last active
May 28, 2018 02:04
-
-
Save wellingtonjhn/d6c9370eddb18e238fd4c8f9f639ea26 to your computer and use it in GitHub Desktop.
AdministrationController - AuthorizeAttribute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Route("api/[controller]"), Authorize(Roles = "Administrator")] | |
| public class AdministrationController : Controller | |
| { | |
| [HttpGet, Route("accounts")] | |
| public async Task<IActionResult> ListUsers() | |
| { | |
| // ... conteúdo omitido | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment