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
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Charting
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors Extensions
  [Expand]Docking and Popups
  [Collapse]File Management
   [Collapse]File Manager
     Overview - FileManager
    [Collapse]Concepts
      Thumbnails
      View Modes
      Uploading Files
      File Download
     [Collapse]Access Control Overview
       Access Rules
       Permissions
     [Expand]Binding to Data
    [Expand]Visual Elements
   [Expand]File Upload
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]SpellChecker
  [Expand]Query Builder
 [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]Office File API
[Expand]Reporting
[Expand]Report and Dashboard 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). Indexing rules within a collection allows you to control 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 + + 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

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.

Use the FileManagerSettingsPermissions.Role property to enforce any created role on the FileManager. After that, the file manager displays folders and files and provides access permissions to them based on the assigned role.

Note

Expanded Examples

How to deny editing files except JPG files:

How to deny browsing the 'Admin' folder:

How to deny editing the 'ReadOnly' folder:

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

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

View the Demo

To see this feature in action, please refer to the following online demo: FileManager - Access Control.

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