Remove(Index: Integer): Boolean;
Index. Access control element index.
The Remove method removes access control element and returns whether deletion is successful.
The method returns True if removal of additional security parameter succeeded.
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(2) Then
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: