Created
March 3, 2020 10:22
-
-
Save kkadir/3a569552dccf447cbed788457d42717f to your computer and use it in GitHub Desktop.
A sample usage of the custom PermissionsAttribute.
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
... | |
... | |
[Permissions(Permissions = new[] { "Read", "Write" }, | |
Roles = new[] { "Admin"})] | |
[HttpGet("{id}")] | |
public async Task<IActionResult> GetAsync(int id) | |
{ | |
... | |
} | |
... | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment