IMetabaseSecurity.CreateExporter

Syntax

CreateExporter: IMetabaseSecurityExporter;

Description

The CreateExporter method creates an object to export settings of security policy and access permissions.

Comments

The user who has the Changing Security Label and Access Control List of Any Object privilege can export access permissions.

The user who has the Changing User Permissions, Distributing Roles, Changing Policy privilege can export security policy settings.

Example

To execute the example, add a link to the Metabase system assembly.

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 settings of security policy and access permissions
    Exporter := MB.Security.CreateExporter;
    Exporter.FileName := 
"C:\MetabasePolicy.csv";
    Exporter.ExportPolicy;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example, settings of security policy are exported to the specified file. If the file already exists, it will be rewritten.

See also:

IMetabaseSecurity