Skip to main content

FileManagerSettingsPermissions.Role Property

Gets or sets a security role that is enforced on the ASPxFileManager.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


public string Role { get; set; }

Property Value

Type Default Description
String String.Empty

A String value specifying a security role name.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to Role
ASP.NET Web Forms Controls ASPxFileManager
ASP.NET MVC Extensions FileManagerSettings


The file manager allows you to associate any number of access rules with specific security roles to group related permissions together. To associate an access rule with a security role, assign the role’s name to the rule’s FileManagerAccessRuleBase.Role property.

Any created role can be enforced on the ASPxFileManager via its Role property. After that, the file manager will display the folder and files and provide access permissions to them based on the assigned role.


Online Demo


<dx:ASPxRadioButtonList ID="rblRole" runat="server" AutoPostBack="true" SelectedIndex="0"  OnValueChanged="rblRole_ValueChanged">
            <dx:ListEditItem Text="Default User" Value="" Selected="True" />
            <dx:ListEditItem Text="Document Manager" Value="DocumentManager" />
            <dx:ListEditItem Text="Media Moderator" Value="MediaModerator" />
            <dx:ListEditItem Text="Administrator" Value="Administrator" />

<dx:ASPxFileManager ID="FileManager" runat="server" ...>


               <dx:FileManagerFolderAccessRule Path="" Edit="Deny" />
               <dx:FileManagerFileAccessRule PathPattern="*.xml" Edit="Deny" />
               <dx:FileManagerFolderAccessRule Path="System" Browse="Deny" />

               <dx:FileManagerFolderAccessRule Path="Documents" Role="DocumentManager" EditContents="Allow" />

               <dx:FileManagerFolderAccessRule Path="Music" Role="MediaModerator" EditContents="Allow" />
               <dx:FileManagerFolderAccessRule Path="Video" Role="MediaModerator" EditContents="Allow" />
               <dx:FileManagerFolderAccessRule Path="" Role="MediaModerator" Upload="Deny" />

               <dx:FileManagerFolderAccessRule Role="Administrator" Edit="Allow" Browse="Allow" />
protected void rblRole_ValueChanged(object sender, EventArgs e) {
     FileManager.SettingsPermissions.Role = (string)rblRole.Value;
See Also