Log In
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Navigation and Layout Extensions
  [Collapse]File Management
   [Collapse]File Manager
     Overview - FileManager
      View Modes
      Uploading Files
      File Download
      Access Control
     [Expand]Binding to Data
    [Expand]Visual Elements
   [Expand]File Upload
  [Expand]Multi-Use Site Extensions
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
 [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]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Access Control

FileManager allows you to define access permissions for folders and files using a set of folder/file access rules (the FileManagerSettingsPermissions.AccessRules collection). Rules are indexed within a collection that allows you to control rule priority. A rule with a higher index has a higher priority.

You can easily set up access rules for folders (including their files and child folders) and individual files using the FileManagerFolderAccessRule and FileManagerFileAccessRule elements respectively. The table below lists the access rule properties that are available for file and folder access rules.

Rule Properties File Access Rule Folder Access Rule Description
Path + + The path to which the rule is applied
Role + + The 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

Permissions are determined by the Rights enumeration values:

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.

You can 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 Role property. Related access rules should be assigned matching role names.

Any created role can be enforced in the FileManager via its FileManagerSettingsPermissions.Role property. After that, the file manager will display folders and files, and provide access permission to them based on the assigned role.

Expanded Examples

How to deny edit files except JPG files:

How to deny browse the 'Admin' folder:

How to deny edit the 'ReadOnly' folder:

How to deny upload to all folders except 'UploadFolder' folder:

How to deny edit files non-admin users:

Is this topic helpful?​​​​​​​