IMetabaseUser.LockedState

Syntax

LockedState: MetabaseUserLockedState;

Description

The LockedState property determines a state of the user locking.

Comments

If the LockedForever state is set, there will be no possibility to unlock the user. The user that has the "Creation, removal of the users" privilege can lock anther user. ADMIN has this privilege by default.

Example

There is the USER_TEST user among the security subjects that were created in the security manager of the current repository.

    Sub UserProc;
    
Var
        mb: IMetabase;
        se: IMetabaseSecurity;
        mbu: IMetabaseUser;
    
Begin
        mb := MetabaseClass.Active;
        se := mb.Security;
        mbu := se.ResolveName(
"USER_TEST"As IMetabaseUser;
        mbu.LockedState := MetabaseUserLockedState.Locked;
        se.Apply;
    
End Sub UserProc;

After executing this example the USER_TEST user is locked.

See also:

IMetabaseUser