{"repo":"mgernand/AspNetCore.Authorization.Permissions","free":true,"listed":false,"github":"https://github.com/mgernand/AspNetCore.Authorization.Permissions","clone":"git clone https://github.com/mgernand/AspNetCore.Authorization.Permissions.git","description":"A permission-based authorization extension","language":"C#","stars":66,"topics":["asp-net-core","authentication","authorization","dotnet","dotnet-core","multi-tenancy","multi-tenant","permissions","tenant"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"AspNetCore.Authorization.Permissions A libary that provides permission-based authorization. The ASP.NET Core role-based authorization in combination with custom authorization policies is a good starting point for restricting users' access in an application, but it is very static and changes to the meaning of a role or a policy forces you to perform changes in your code and to re-deploy your application. This library aims to overcome this limitation. To be able to dynamically change the access of a user we extend the role in a way that each role is made up of several fine gained permissions. Throughout the documentation and the sample applications we will use the following roles and permissions. Role Invoice.Read Invoice.Write Invoice.Delete Invoice.Send Invoice.Payment --------------- -------------- --------------- ---------------- -------------- ----------------- Boss YES NO NO NO NO Manager YES NO YES NO NO Employee YES YES NO YES YES In this fictional company the boss can only read invoices, the manager can read and delete invoices and the employees can read, write, send invocies and can trigger the selllement of the invoice. If we build the authentication around the three role we will hard-code the access permissions in our codebase f.e. using the attribute. But if the boss decides he also wants to be able to delete invoices, we need to change it in the source code. Using permissions of the role defined in the table above in the attribute instead of the roles, we can just","default_branch":null,"files":null,"tree":[],"storefront":"/r/mgernand","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mgernand/AspNetCore.Authorization.Permissions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}