IMetabaseUser.CannotChangePassword

Syntax

CannotChangePassword: Boolean;

Description

The CannotChangePassword property determines whether the change of password is denied.

Comments

The property is set to False by default, and the user can change his own password. If the property is set to True, the exception will be thrown on an attempt to change the password.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    User: IMetabaseUser;
    Users: IMetabaseUsers;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    Users := MS.Users;
    User := Users.Item(
0);
    
// Deny password change by the user
    User.CannotChangePassword := True;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the password change is denied for the first user.

See also:

IMetabaseUser