IMetabaseUser.Certificate

Syntax

Certificate: String;

Description

The Certificate property assigns certificate copy to the user, under whom the login is executed.

Comments

A certificate copy can be obtained using the IMetabaseUser.InitCertificate method.

Example

Executing the example requires the Button and EditBox components named Button1, EditBox1 on the form. 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;
    Value: String;
    User: IMetabaseUser;
    Security: IMetabaseSecurity;
    Lic: Object;
Begin
    // Get data of the current repository
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    Security := MB.Security;
    
// Assign certificate copy to the ADMIN user
    User := Security.ResolveName("ADMIN"As IMetabaseUser;
    
// Set certificate value
    Value := EditBox1.Text;
    User.Certificate := Value;
    
// Save changes
    Security.Apply;
    
// Check in license
    Lic := Null;
End Sub Button1OnClick;

After executing the example, clicking the button assigns the ADMIN user the certificate entered by the administrator in the EditBox1 component.

See also:

IMetabaseUser