This demo shows how to set up folder and file access permissions, grant them to security roles and enforce specific roles on File Manager.
File Manager allows you to define access permissions for folders and files using a set of folder/file access rules (see the file manager's SettingsPermissions.AccessRules collection). An access rule specifies a path to which it is applied and lists permissions (allowed or denied actions) associated with this rule. You can easily set up access rules for folders (including their files and child folders) and individual files using FileManagerFolderAccessRule and FileManagerFileAccessRule elements.
In addition, 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 on the File Manager via its SettingsPermissions.Role property. After that, the file manager will display folder and files and provide access permissions to them based on the assigned role.
In the demo, you can select one of the security roles listed above to enforce it on File Manager. File and folder permissions granted to each role are listed below.