ExportObjectsRights(Order: MetabaseExportObjectsRightsOrder);
Order. It determines records order in a file.
The ExportObjectsRights method exports access permissions on objects.
Before method call it is necessary to determine a name and location of the file (the FileName property), to which export is executed.
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 access permissions
Exporter := MB.Security.CreateExporter;
Exporter.FileName := "C:\MetabaseObjectsRights.csv";
Exporter.ExportObjectsRights(MetabaseExportObjectsRightsOrder.Hierarchical);
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example, access permissions are exported to the specified file. If the file has already existed, it will be overwritten.
See also: