DeniedPermissions take precedence over AllowedPermissions. For instance, when AllowedPermissions is set to Full and DeniedPermissions is set to Download and Upload, all permissions except Download and Upload will be allowed.
When combining permissions, they should be separated by comma in string and by bitwise 'or' operator in code (| in C# and OR in VB).
public FileManagerPermissions AllowedPermissions { get; set; }
Public Property AllowedPermissions As FileManagerPermissions
Get
Set
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" />