IMetabasePasswordPolicy.MaxAge

Syntax

MaxAge: Integer;

Description

The MaxAge property determines the maximum password age (days).

Fore Example

To execute the example, add a link to the Metabase system assembly.

Sub Main;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
    PassPol: IMetabasePasswordPolicy;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    MU := MS.Policy;
    PassPol := MU.PasswordPolicy;
    PassPol.MaxAge := 90;
    PassPol.WarningMaxAge := 5;
    MS.Apply;
End Sub Main;

After executing the example the maximum password age is 90 days ad the notification about the necessity of changing password 5 days before it expires.

Fore.NET Example

To execute the example, add a link to the Metabase system assembly.

Imports Prognoz.Platform.Interop.Metabase;
...
Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
    PassPol: IMetabasePasswordPolicy;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    MU := MS.Policy;
    PassPol := MU.PasswordPolicy;
    PassPol.WarningMaxAge := 0;
    MS.Apply;
End Sub Main;

After executing the example the maximum password age is 90 days ad the notification about the necessity of changing password 5 days before it expires.

See also:

IMetabasePasswordPolicy