Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Collapse]File Management
   [Expand]Product Information
   [Collapse]File Manager
     ASPxFileManager Overview
    [Collapse]Concepts
      Thumbnails
      View Modes
      Custom Columns
      Toolbar
      Adaptivity
      Uploading Files
      File Download
      Context Menu
     [Collapse]Access Control Overview
       Access Rules
       Permissions
     [Expand]File System Providers
      Security Considerations
    [Expand]Visual Elements
    [Expand]Member Tables
    [Expand]Examples
   [Expand]File Upload
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Access Rules

This topic illustrates how to define security permissions for folders and files using a set of folder/file access rules (the FileManagerSettingsPermissions.AccessRules collection). Rules are indexed within a collection. This allows controlling the rules' priority. A rule with a higher index has a higher priority.

Note

Refer to the Permissions topic for details on how to permit or deny access to individual files and folders or to implement complicated user access logic.

To set up access rules for folders (including their files and child folders) and individual files, use the FileManagerFolderAccessRule and FileManagerFileAccessRule elements. The table below lists the access rule properties that are available for files and folders.

Rule Properties File Access Rule Folder Access Rule Description
Path + + A path to which the rule is applied
Role + + A role to which the rule is applied
Browse + + Permission to view a file/folder
Download + - Permission to download a file
Edit + + Permission to edit a file/folder and its content (for folders)
Edit Content - + Permission to edit folder content
Upload - + Permission to upload files to a folder

The following Rights enumeration values determine permissions:

Value Description
Allow Rights.Allow The action is allowed within the access rule.
Deny Rights.Deny The action is denied within the access rule.
Default Rights.Default The action has an identical permission as the current item (file or folder) parent element. It corresponds to the Allow permission if this value does not exist.

Associating any number of access rules with specific security roles allows you to group related permissions. To associate an access rule with a security role, assign the role's name to the rule's Role property. Related access rules should be assigned to matching role names.

Any created role can be enforced on the ASPxFileManager using its FileManagerSettingsPermissions.Role property. After that, the file manager displays folders and files and provides access permissions to them based on the assigned role.

Note

ASPxFileManager does not allow an end-user to edit a folder that contains files or folders with denied access.

Expanded Examples

How to deny editing files except for JPG files:

How to deny browsing the 'Admin' folder:

How to deny editing the 'ReadOnly' folder:

How to deny uploading any folders except the 'UploadFolder' folder:

How to deny non-admin users permission to edit files:

How would you rate this topic?​​​​​​​