IMetabasePolicy.AutoLockPeriod

Syntax

AutoLockPeriod: Integer;

Description

The AutoLockPeriod property determines the period of user inactivity in days, after which the user account is locked.

Comments

The property is set to 0 by default, there are no lockings.

Example

Executing the example requires that the repository contains a form with the Button component named Button1 and the IntegerEdit component named IntegerEdit1. The example is a handler of the OnClick event for the Button1 component.

Add a link to the Metabase system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
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;
    
// Set user inactivity period
    Policy.AutoLockPeriod := IntegerEdit1.Value;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub Button1OnClick;

After clicking the button, the user inactivity period will be set that is specified in the IntegerEdit component, after which the user account is locked.

See also:

IMetabasePolicy