IMetabaseUpdateSecuritySubjectNode.Subject

Syntax

Subject: ISecuritySubject;

Description

The Subject property determines security subject that data are necessary to add in update.

Example

Sub Main;

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 Main;

After executing this example a new update is created. All users of current repository are included in this update. Update is saved in the file User_Update.pefx.

See also:

IMetabaseUpdateSecuritySubjectNode