IMetabaseUpdateAccessSubject.Name

Syntax

Name: String;

Description

The Name property returns the security subject name.

Example

To execute the example, make sure that the D:\ drive contains the Update.pefx update file.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    Upd: IMetabaseUpdate;
    RootFolder: IMetabaseUpdateFolderNode;
    Subj: IMetabaseUpdateAccessSubject;
    Subjs: IMetabaseUpdateAccessSubjects;
    Se: IMetabaseSecurity;
    Lic: Object;
Begin
    Mb := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := Mb.RequestLicense(UiLicenseFeatureType.Adm);
    Upd := Mb.CreateUpdate;
    Upd.LoadFromFileNF(
"D:\Update.pefx");
    Upd.AllowReplaceSD := 
True;
    RootFolder := Upd.RootFolder;
    Subjs := Upd.Subjects;
    Debug.WriteLine(
"Number of security subjects used in 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;
    
// Save changes
    Se.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the console displays information about all security subjects, for which object access permissions will be updated.

See also:

IMetabaseUpdateAccessSubject