Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (41 sloc) 2.56 KB


Permissions are used to control user access to a web application resources. You can manage them (add, edit, and delete) from the backend using the :guilabel:`Audience/Permissions` section:


Each permission has name, code, and position. Position might be used to sort the permissions in the correct order:


Once you have created a permission, you can assign it to a role (and then to a user). While signing in, all the user roles and all the permissions from that roles are attached to the user as the claims. These claims then can be checked from the code:

Platformus uses authorization policies to control access to the controllers and actions:

In order to be able to use an authorization policy, it should be added to the authorization options inside the services.AddAuthorization() extension method:

As you can see, the ExtCore framework’s ExtensionManager class is used to get all the instances of the IAuthorizationPolicyProvider interface implementations. Then method IAuthorizationPolicyProvider.GetAuthorizationPolicy() is used to get the authorization policies.

So, if the permission is used to control access to a controller or action, you need to implement the IAuthorizationPolicyProvider interface and then add corresponding attribute to the controller or action. If you only want to check the permission from code, you don’t have to implement that interface.