IMetabasePolicy.MaxLogonSessions

Syntax

MaxLogonSessions: Integer;

Description

The MaxLogonSessions property determines the maximum number of concurrent repository logins for the security subject.

Comments

Security subjects are users and groups of users. The property sets constraint for all security subjects and is relevant when the user is not created in the security subject but is in a group, for example, when domain authentication is used.

To determine the maximum number of concurrent logins of specified user, use the IMetabaseUser.MaxLogonSessions property.

Features of interaction of the IMetabasePolicy.MaxLogonSessions property with the IMetabaseUser.MaxLogonSessions property:

The property is set to 0 by default, which means the number of logins is unlimited. If the number of allowed repository logins is exceeded, the security subject is denied login to the system and the corresponding message is displayed.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Policy: IMetabasePolicy;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    // Get license to be able to work with the security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    // Get security policy settings
    Policy := MS.Policy;
    // Set maximum number of sessions for security subject
    Policy.MaxLogonSessions := 5;
    // Save changes
    MS.Apply;
    // Check in license
    Lic := Null;
End Sub UserProc;

After executing the example, the maximum number of concurrent repository logins is set for the security subject.

See also:

IMetabasePolicy