ASP.NET Core has a powerful mechanism for implementing resource-based authorization using the IAuthorizationService and resource-based AuthorizationHandlers. In this week’s video, Monster Dave builds a tag helper that makes it simple to use resource-based authorization to Razor views without writing any C# code in the view.
Related Links:
Blog Post - https://www.davepaquette.com/archive/2017/11/28/authorize-resource-tag-helper.aspx
Official ASP.NET Core Docs - https://docs.microsoft.com/en-us/aspnet/core/security/authorization/resourcebased?tabs=aspnetcore2x
NuGet Package: https://www.nuget.org/packages/TagHelperSamples.Authorization/