AllowReplaceSD: Boolean;
AllowReplaceSD: Boolean;
The AllowReplaceSD property determines whether it is possible to replace the list of security access control for the update objects.
If AllowReplaceSD is set to False, the ReplaceSecurityDescriptor value of the update element is ignored.
To execute the example, add a link to the Metabase system assembly. The C:\Update.pefx update file with the element with OBJ1 identifier, the repository object or a special object should exist.
Sub UserProc;
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UON: IMetabaseUpdateObjectNode;
obj: IMetabaseObjectDescriptor;
objkey: integer;
Begin
MB := MetabaseClass.Active;
Update := Mb.CreateUpdate;
Update.LoadFromFileNF("D:\Update.pefx");
obj := MB.ItemById("OBJ1");
objkey := obj.Key;
Update.AllowReplaceSD := True;
UON := Update.RootFolder.FindObject(objkey);
UON.UpdatePart := MetabaseObjectUpdatePart.ReplaceSecurityDescriptor;
Update.SaveToFileNF("D:\Update_AR.pefx");
End Sub UserProc;
After executing the example to the D:\ folder the update file with changed access control list for the object with the OBJ1 identifier.
To execute the example, add a link to the Metabase system assembly. The C:\Update.pefx update file with the element with OBJ1 identifier, the repository object or a special object should exist.
Sub UserProc(Params: StartParams);
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UON: IMetabaseUpdateObjectNode;
obj: IMetabaseObjectDescriptor;
objkey: uinteger;
Begin
MB := Params.Metabase;
Update := Mb.CreateUpdate();
Update.LoadFromFileNF("D:\"+ "Update.pefx", UpdateLoadMode.ulmReplace);
obj := MB.ItemById["FLASH_DO"];
objkey := obj.Key;
Update.AllowReplaceSD := True;
UON := Update.RootFolder.FindObject(objkey);
UON.UpdatePart := MetabaseObjectUpdatePart.moupReplaceSecurityDescriptor;
Update.SaveToFileNF("D:\"+ "Update_AR.pefx");
End Sub;
After executing the example to the D:\ folder the update file with changed access control list for the object with the OBJ1 identifier.
See also: