IObjectSecurity Method: RevokeAccessPermissions

Trustee As String,
AccessPermissions As String


[in] String Trustee
User or group name for whom permissions are to be revoked.

[in] String AccessPermissions
Access permissions to be revoked. See Access Permissions for a complete list of access permissions for a securable object.

Removes the specified permissions for the Trustee on the current object. This is done by adding a deny ACE (Access Control Entry) for the specified trustee.


Dim ObjSec  As IObjectSecurity
Dim strFilePath As String
strFilePath = "d:\test.txt"
Set ObjSec = CreateObject("DirectScript.ObjectSecurity")
ObjSec.AttachFile strFilePath
'Revoke Full Control("F") permission for "TrusteeName"
ObjSec.RevokeAccessPermissions "TrusteeName", "F"


See Also