IMetabasePasswordPolicy.UniquenessDegree

Syntax

UniquenessDegree: Integer;

UniquenessDegree: System.Int32;

Description

The UniquenessDegree property determines the minimum difference of an old password from a new one (characters).

Example

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;
    PassPol: IMetabasePasswordPolicy;
    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;
    PassPol := MU.PasswordPolicy;
    
// Set minimum difference of the old password from the new one in characters
    PassPol.UniquenessDegree := 5;
    
// 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;
    PassPol: IMetabasePasswordPolicy;
    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;
    PassPol := MU.PasswordPolicy;
    
// Set minimum difference of the old password from the new one in characters
    PassPol.UniquenessDegree := 5;
    
// Save changes
    MS.Apply();
    
// Check in license
    Lic := Null;
End Sub;

After executing the example the minimum difference of the old password from a new one is set 5 characters.

See also:

IMetabasePasswordPolicy