FileManagerAccessRuleBase Class
Serves as the base type for the FileManagerFileAccessRule and FileManagerFolderAccessRule objects.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Remarks
The FileManagerAccessRuleBase class is the base class which implements the access rule functionality. This functionality is inherited by the FileManagerAccessRuleBase class’s descendants - the FileManagerFileAccessRule and FileManagerFolderAccessRule classes.
Concept
Example
Web Forms (in markup):
<dx:ASPxFileManager ID="ASPxFileManager1" runat="server">
<SettingsPermissions>
<AccessRules>
<dx:FileManagerFileAccessRule Edit="Deny" PathPattern="*.docx" />
<dx:FileManagerFolderAccessRule Role="Administrator" EditContents="Allow" Path="Documents" />
</AccessRules>
</SettingsPermissions>
</dx:ASPxFileManager>
Web Forms (in code):
ASPxFileManager fm = new ASPxFileManager();
...
FileManagerFileAccessRule fileRule = new FileManagerFileAccessRule();
fileRule.PathPattern = "*.docx";
fileRule.Edit = Rights.Deny;
FileManagerFolderAccessRule folderRule= new FileManagerFolderAccessRule();
folderRule.Role = "Administrator";
folderRule.EditContents = Rights.Allow;
FileManager.SettingsPermissions.AccessRules.Add(fileRule);
FileManager.SettingsPermissions.AccessRules.Add(folderRule);
...
MVC:
@Html.DevExpress().FileManager( settings => {
settings.Name = "fileManager";
FileManagerFileAccessRule fileRule = new FileManagerFileAccessRule();
fileRule.PathPattern = "*.docx";
fileRule.Edit = Rights.Deny;
FileManagerFolderAccessRule folderRule= new FileManagerFolderAccessRule();
folderRule.Role = "Administrator";
folderRule.EditContents = Rights.Allow;
FileManager.SettingsPermissions.AccessRules.Add(fileRule);
FileManager.SettingsPermissions.AccessRules.Add(folderRule);
...
}).BindToFolder(Model).GetHtml()
Online Demo
Inheritance
See Also