IMetabaseUpdateObjectNode.Acl

Syntax

Acl: IAccessControlList;

Description

The Acl property returns the list of access control to the object saved in update.

Comments

It is relevant when the discretionary access control method is used. Conditions for using the property:

If the specified conditions are satisfied, the Acl property can be used to change object access control parameters. The changed parameters will be saved in update.

Access control parameters will be copied from the source object (IMetabaseObjectDescriptor->SecurityDescriptor->Acl) if at least one condition is satisfied.

Example

Executing the example requires that the repository contains objects with the OBJ1 and OBJ2 identifiers. Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    Obj: IMetabaseObjectDescriptor;
    Upd: IMetabaseUpdate;
    Nd: IMetabaseUpdateObjectNode;
    RootFolder: IMetabaseUpdateFolderNode;
    ObjDesc: IMetabaseObjectDescriptor;
    SecDesc: ISecurityDescriptor;
    AcessCL: IAccessControlList;
Begin
    Mb := MetabaseClass.Active;
    ObjDesc := MB.ItemById("OBJ1");
    SecDesc := ObjDesc.SecurityDescriptor;
    AcessCL := SecDesc.Acl;
    Upd := Mb.CreateUpdate;
    RootFolder := Upd.RootFolder;
    Nd := RootFolder.Add(MetabaseUpdateNodeType.Object) As IMetabaseUpdateObjectNode;
    Upd.AllowReplaceSD := True;
    Nd.UpdatePart := MetabaseObjectUpdatePart.ReplaceSecurityDescriptor;
    Obj := Mb.ItemById("OBJ2").Bind;
    Nd.Object := Obj;
    Nd.Acl.Append(AcessCL);
    Upd.SaveToFileNF("C:\Update.pefx");
    Upd := Mb.CreateUpdate;
    Upd.LoadFromFileNF("C:\Update.pefx");
    Upd.Apply;
End Sub UserProc;

During the execution of the example the created update is installed. After executing the example the additional security parameters of the repository object with the OBJ2 identifiers will be replaced with OBJ1 additional parameters.

See also:

IMetabaseUpdateObjectNode