HashedPasswords: IHashedPasswords;
HashedPasswords: Prognoz.Platform.Interop.IMetabase.IHashedPasswords;
The HashedPasswords property determines parameters of password hashing.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MBPolicy: IMetabasePolicy;
MBPasswordPolicy: IMetabasePasswordPolicy;
HPass: IHashedPasswords;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
MBPolicy := MS.Policy;
MBPasswordPolicy := MBPolicy.PasswordPolicy;
HPass := MBPasswordPolicy.HashedPasswords;
// Set password hashing
HPass.IsON := True;
HPass.ExcludeAdmin := True;
// 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;
MBPolicy: IMetabasePolicy;
MBPasswordPolicy: IMetabasePasswordPolicy;
HPass: IHashedPasswords;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
MBPolicy := MS.Policy;
MBPasswordPolicy := MBPolicy.PasswordPolicy;
HPass := MBPasswordPolicy.HashedPasswords;
// Set password hashing
HPass.IsON := True;
HPass.ExcludeAdmin := True;
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing the example the password hashing will be enabled and the admin password is not hashed.
See also: