CheckUserPassword: Boolean;
CheckUserPassword: System.Boolean;
The CheckUserPassword property determines whether authorization by platform means is used.
By default the property is set to False, and authentication by means of DBMS is used.
If the True value is set, authorization by platform means is used: to access the DBMS data the connection under the built-in administrator is established (the schema owner in DBMS). Passwords and permissions are checked at platform level, and permissions are not granted through the database server.
Enabled built-in authorization is not used if the integrated domain, domain or role authentication in DBMS is set in the repository settings.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
Policy := MS.Policy;
// Enable using embedded authorization
If Policy.CheckUserPassword = False Then
Policy.CheckUserPassword := True;
End If;
// 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;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := Params.Metabase;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
Policy := MS.Policy;
// Enable using embedded authorization
If Policy.CheckUserPassword = False Then
Policy.CheckUserPassword := False;
End If;
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing the example the authorization by platform means is enabled, if authorization by means of DBMS has been used before.
See also: