When combining permissions, they should be separated by comma in string and by bitwise 'or' operator in code (| in C# and OR in VB).
[FlagsAttribute]
public enum FileManagerPermissions
<FlagsAttribute>
Public Enumeration FileManagerPermissions
Setting access control permissions in code:
//allow only read-only set of permissions
accessControl.AllowedPermissions = FileManagerPermissions.ReadOnly;
//allow only ListSubfolders and ListFiles permissions
accessControl.AllowedPermissions = FileManagerPermissions.ListSubfolders | FileManagerPermissions.ListFiles;
//allow all except Download and Upload permissions
accessControl.AllowedPermissions = FileManagerPermissions.Full;
accessControl.DeniedPermissions = FileManagerPermissions.Download | FileManagerPermissions.Upload;
'allow only read-only set of permissions
accessControl.AllowedPermissions = FileManagerPermissions.ReadOnly
'allow only ListSubfolders and ListFiles permissions
accessControl.AllowedPermissions = FileManagerPermissions.ListSubfolders Or FileManagerPermissions.ListFiles
'allow all except Download and Upload permissions
accessControl.AllowedPermissions = FileManagerPermissions.Full
accessControl.DeniedPermissions = FileManagerPermissions.Download Or FileManagerPermissions.Upload
Setting access control permissions in ASPX markup:
<%-- allow only read-only set of permissions --%>
<GleamTech:FileManagerAccessControl
Path="\"
AllowedPermissions="ReadOnly" />
<%-- allow only ListSubfolders and ListFiles permissions --%>
<GleamTech:FileManagerAccessControl
Path="\"
AllowedPermissions="ListSubfolders, ListFiles" />
<%-- allow all except Download and Upload permissions --%>
<GleamTech:FileManagerAccessControl
Path="\"
AllowedPermissions="Full"
DeniedPermissions="Download, Upload" />
None | None of the permissions (unset). |
ListSubfolders | Ability to list subfolders. |
ListFiles | Ability to list files. |
Create | Ability to create files or subfolders. |
Delete | Ability to delete files or subfolders. |
Rename | Ability to rename files or subfolders. |
Edit | Ability to overwrite existing files. |
Upload | Ability to upload files or subfolders. |
Download | Ability to download files or subfolders. |
Compress | Ability to compress (zip) files or subfolders. |
Extract | Ability to extract archive files. |
Cut | Ability to cut files or subfolders. |
Copy | Ability to copy files or subfolders. |
Paste | Ability to paste files or subfolders. |
Preview | Ability to preview files with DocumentViewer, ImageViewer or MediaPlayer. |
Ability to print documents (used by DocumentViewer). | |
ReadOnly | The read-only permissions combined. |
Full | All the permissions combined. |