Subject: ISecuritySubject;
The Subject property determines a security subject, which data should be added to update.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MU: IMetabaseUpdate;
SubNode: IMetabaseUpdateSecuritySubjectNode;
Sec: IMetabaseSecurity;
Subj: ISecuritySubject;
i: Integer;
Begin
MB := MetabaseClass.Active;
MU := MB.CreateUpdate;
Sec := MB.Security;
For i := 0 To Sec.Users.Count - 1 Do
Subj := Sec.Users.Item(i);
SubNode := MU.RootFolder.Add(MetabaseUpdateNodeType.SecuritySubject) As IMetabaseUpdateSecuritySubjectNode;
SubNode.Label := Subj.Name;
SubNode.Subject := Subj;
End For;
MU.SaveToFileNF("C:\User_Update.pefx");
End Sub UserProc;
After executing the example, a new update is created, which includes all users of the current repository. The update is saved to the User_Update.pefx file.
See also: