Name: String;
Name: String;
The Name property returns the name of the security subject.
To execute an example, add links to the Metabase and Stat system assemblies. The example uses the update file located in D:\.
Sub Main;
Var
Mb: IMetabase;
Upd: IMetabaseUpdate;
RootFolder: IMetabaseUpdateFolderNode;
subj: IMetabaseUpdateAccessSubject;
subjs: IMetabaseUpdateAccessSubjects;
se: IMetabaseSecurity;
Begin
Mb := MetabaseClass.Active;
Upd := Mb.CreateUpdate;
Upd.LoadFromFileNF("D:\Update.pefx");
Upd.AllowReplaceSD := True;
RootFolder := Upd.RootFolder;
subjs := Upd.Subjects;
debug.WriteLine("The number of security subjects participating in the access permissions update: ");
se := Mb.Security;
For Each subj In subjs Do
debug.WriteLine(subj.Name);
debug.WriteLine(subj.Description);
debug.WriteLine(subj.Sid.AsString);
End For;
End Sub Main;
After executing the example in the console the information about all security subjects for which the access permission will be updated.
To execute an example, add links to the Metabase and Stat system assemblies. The example uses the update file located in D:\.
Sub UserProc(Params: StartParams);
Var
Mb: IMetabase;
Upd: IMetabaseUpdate;
RootFolder: IMetabaseUpdateFolderNode;
subj: IMetabaseUpdateAccessSubject;
subjs: IMetabaseUpdateAccessSubjects;
se: IMetabaseSecurity;
Begin
Mb := Params.Metabase;
Upd := Mb.CreateUpdate();
Upd.LoadFromFileNF("D:\"+ "Update.pefx", UpdateLoadMode.ulmReplace);
Upd.AllowReplaceSD := True;
RootFolder := Upd.RootFolder;
subjs := Upd.Subjects;
System.Diagnostics.Debug.WriteLine("The number of security subjects participating in updating access permissions: ");
se := Mb.Security;
For Each subj In subjs Do
System.Diagnostics.Debug.WriteLine(subj.Name);
System.Diagnostics.Debug.WriteLine(subj.Description);
System.Diagnostics.Debug.WriteLine(subj.Sid.AsString);
End For;
End Sub;
After executing the example in the console the information about all security subjects for which the access permission will be updated.
See also: