IMetabaseSecurityExporter.ExportObjectsRights

Syntax

ExportObjectsRights(Order: MetabaseExportObjectsRightsOrder);

ExportObjectsRights(Prognoz.Platform.Interop.Metabase.MetabaseExportObjectsRightsOrder);

Parameters

Order. Determines records order in a file.

Description

The ExportObjectsRights method exports access permissions on objects.

Comments

Before method call it is necessary to determine filename and its location (property FileName) in which export is performed.

Example

To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Exporter: IMetabaseSecurityExporter;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    
// Export access permissions
    Exporter := MB.Security.CreateExporter;
    Exporter.FileName := 
"C:\MetabaseObjectsRights.csv";
    Exporter.ExportObjectsRights(MetabaseExportObjectsRightsOrder.Hierarchical);
    
// Check in license
    Lic := Null;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Exporter: IMetabaseSecurityExporter;
    Lic: Object;
Begin
    MB := Params.Metabase;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
    
// Export access permissions
    Exporter := MB.Security.CreateExporter();
    Exporter.FileName := 
"C:\MetabaseObjectsRights.csv";
    Exporter.ExportObjectsRights(MetabaseExportObjectsRightsOrder.Hierarchical);
    
// Check in license
    Lic := Null;
End Sub;

After executing this example the export of access permissions in a specified file is performed. If the file has already existed it will be overwritten.

See also:

IMetabaseSecurityExporter