IMetabaseUser.MaxLogonSessions

Syntax

MaxLogonSessions: Integer;

Description

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

Comments

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 user is denied login to the system and the corresponding message is displayed.

To determine the maximum number of simultaneous security subject connections, use the IMetabasePolicy.MaxLogonSessions property.

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

Example

To execute the example, make sure that security manager contains the USER user.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Security: IMetabaseSecurity;
    User: IMetabaseUser;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    Security := MB.Security;
    
// Set maximum number of simultaneous user connections to repository
    User := Security.ResolveName("USER"As IMetabaseUser;
    User.MaxLogonSessions := 
5;
    
// Save changes
    Security.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example, the maximum number of simultaneous connections to the current repository is set for the USER user.

See also:

IMetabaseUser