Assign(Source: IAccessControlList);
Assign(Source: Prognoz.Platform.Interop.Metabase.IAccessControlList)
Source. Additional security parameters of the source object.
The Assign method replaces additional security parameters of the object.
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.
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: