FileManagerFileAccessRule.FullAccess Property
Gets or sets the full access permission for files.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Rights | Default | One of the Rights enumeration values specifying the action permission. |
Available values:
Name | Description |
---|---|
Allow | The action is allowed within the access rule. |
Deny | The action is denied within the access rule. |
Default | The action has an identical permission as the current item (file or folder) parent element. It corresponds to the Rights.Allow permission if this value does not exist. |
Remarks
Use File Manager access rules (the FileManagerSettingsPermissions.AccessRules collection) to define access permissions for folders and files. A file access rule specifies a pattern for file paths where the rule is applied and a permission that is an allowed or denied action associated with this rule.
Use the FullAccess
property to specify whether end users with the specified role (FileManagerAccessRuleBase.Role) can view and edit files whose paths match the pattern that the FileManagerFileAccessRule.PathPattern property specifies. If this property is set to Rule.Deny
, the affected files are not displayed in the File Manager UI and cannot be modified or downloaded.
The code samples below demonstrate how to specify the FullAccess
permission.
Web Forms (in markup):
<dx:ASPxFileManager ID="ASPxFileManager1" runat="server">
<SettingsPermissions>
<AccessRules>
<dx:FileManagerFileAccessRule FullAccess="Allow" PathPattern="*.docx" />
</AccessRules>
</SettingsPermissions>
</dx:ASPxFileManager>
Web Forms (in code):
ASPxFileManager fm = new ASPxFileManager();
...
FileManagerFileAccessRule fileRule = new FileManagerFileAccessRule();
fileRule.PathPattern = "*.docx";
fileRule.FullAccess = Rights.Allow;
FileManager.SettingsPermissions.AccessRules.Add(fileRule);
...
MVC:
@Html.DevExpress().FileManager( settings => {
settings.Name = "fileManager";
FileManagerFileAccessRule fileRule = new FileManagerFileAccessRule();
fileRule.PathPattern = "*.docx";
fileRule.FullAccess = Rights.Allow;
FileManager.SettingsPermissions.AccessRules.Add(fileRule);
...
}).BindToFolder(Model).GetHtml()