IObjectSecurity Method: RevokeAccessPermissions

RevokeAccessPermissions
(
Trustee As String,
AccessPermissions As String
);

Parameters

[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.

Description
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.

Example

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