IAccessControlList.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index. Access control element index.

Description

The Remove method removes access control element and returns whether deletion is successful.

Comments

The method returns True if removal of additional security parameter succeeded.

Example

Executing the example requires that the repository contains an object with the OBJ_1 identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    ObjDesc: IMetabaseObjectDescriptor;
    SecDesc: ISecurityDescriptor;
    AcessCL: IAccessControlList;
    ACE: IAccessControlEntry;
    s: String;
Begin
    MB := MetabaseClass.Active;
    ObjDesc := MB.ItemById("Obj_1");
    SecDesc := ObjDesc.SecurityDescriptor;
    SecDesc.Edit;
    AcessCL := SecDesc.Acl;
    If AcessCL.Remove(2Then
        s := "Yes";
    Else
        s := "No";
    End If;
    SecDesc.Apply(True);
End Sub UserProc;

 

After executing the example the "s" variable contains "Yes" if the third access control element is deleted successfully.

See also:

IAccessControlList