Application permissions

Application permissions are actions related to global backend actions (for example, managing users, roles, files and licenses). The application permissions are listed under the Telerik.Sitefinity.Security.AppAction enumeration and are associated with the Backend permission set. To manage application permissions, you use SecurityManager.

Application permissions configuration

The application permissions in SecurityConfig are presented with the SecurityConstants.Sets.Backend permission set. 

The following code queries for the application permissions set and the manage users action. For more information, see For developers: Permissions configuration.

To get the application permissions set configuration, you can also use the AppPermissions class. For more information, see AppPermissions.

AppPermissions

The AppPermissions class is helper class for working with application permissions. 

AppPermissions provides you with the following properties and methods:

  • IsGranted - you use the IsGranted method to check whether permissions are granted for the current user. To specify the actions, you use array of AppAction or bitwise OR mask.
  • Demand - you use the Demand method to demand permissions for the current user. To specify the actions, you use array of AppAction or bitwise OR mask.
  • Root - returns the application permissions security root.
  • Settings - returns the backend permission set configuration from SecurityConfig. For more information, see For developers: Permissions configuration.

Granting user with manage files permission

The following example grants the specified user with the manage files permissions. 

First, you initialize the users and security managers. Then, you get the application permissions security root. The ID of the security root is persisted in AppPermissions.Root.Id. You create the permissions using the CreatePermissions method of the security manager. For more information, see For developers: CRUD operations with permissions. To grant the manage files action, you use the GrantActions method. For more information, see For developers: Grant and deny permissions. Then, you add the permissions to the security root. Finally, you save the changes.


Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?