IAccessControlList.Assign

Fore Syntax

Assign(Source: IAccessControlList);

Fore.NET Syntax

Assign(Source: Prognoz.Platform.Interop.Metabase.IAccessControlList)

Parameters

Source. Additional security parameters of the source object.

Description

The Assign method replaces additional security parameters of the object.

Fore Example

Executing the example requires an object with the OBJ1 and OBJ2 identifiers in the repository.

Sub UserProc;
    Var
        MB: IMetabase;
        ObjDesc: IMetabaseObjectDescriptor;
        ObjDesc2: IMetabaseObjectDescriptor;
        SecDesc: ISecurityDescriptor;
        SecDesc2: ISecurityDescriptor;
        AcessCL: IAccessControlList;
        AcessCL2: IAccessControlList;
    Begin
        MB:=MetabaseClass.Active;
        ObjDesc:=MB.ItemById("OBJ1");
        SecDesc:=ObjDesc.SecurityDescriptor;
        SecDesc.Edit;
        AcessCL:=SecDesc.Acl;
        ObjDesc2:=MB.ItemById("NSI");
        SecDesc2:=ObjDesc2.SecurityDescriptor;
        AcessCL2:=SecDesc2.Acl; 
        AcessCL.Assign(AcessCL2);
        SecDesc.Apply(True);
End Sub UserProc;

After executing the example the additional security parameters of OBJ1 object will be replaced by the OBJ2 additional parameters.

Fore.NET Example

Executing the example requires an object with the OBJ1 and OBJ2 identifiers in the repository.

Sub UserProc;
    Var 
        MB: IMetabase;
        ObjDesc: IMetabaseObjectDescriptor;
        ObjDesc2: IMetabaseObjectDescriptor;
        SecDesc: ISecurityDescriptor;
        SecDesc2: ISecurityDescriptor;
        AcessCL: IAccessControlList;
        AcessCL2: IAccessControlList;
    Begin
        MB:=Params.Metabase;
        ObjDesc:=MB.ItemById["OBJ1"];
        SecDesc:=ObjDesc.SecurityDescriptor;
        SecDesc.Edit();
        AcessCL:=SecDesc.Acl;
        ObjDesc2:=MB.ItemById["NSI"];
        SecDesc2:=ObjDesc2.SecurityDescriptor;
        AcessCL2:=SecDesc2.Acl; 
        AcessCL.Assign(AcessCL2);
        SecDesc.Apply(True);

End Sub;

After executing the example the additional security parameters of OBJ1 object will be replaced by the OBJ2 additional parameters.

See also:

IAccessControlList