AllowUserQueries: Boolean;
AllowUserQueries: System.Boolean;
The AllowUserQueries property determines whether the development tools for data exporting from the platform warehouse will be available.
By default the property is set to True. If the property is set to False, the use of the Dal system assembly, the File class in the IO system assembly, the UiQuery component will be locked.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
MU := MS.Policy;
// Deny extended features of work with database and external files
MU.AllowUserQueries := False;
// Deny work with clipboard
MU.CopyToClipboardAllowed := False;
// Save changes
MS.Apply;
// 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;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
Lic: Object;
Begin
MB := Params.Metabase;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
MU := MS.Policy;
// Deny extended features of work with database and external files
MU.AllowUserQueries := False;
// Deny work with clipboard
MU.CopyToClipboardAllowed := False;
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing this example the work with a clipboard and extended possibilities to work with DB and external files are prohibited while working in repository.
See also:
IMetabasePolicy | General policy