IMetabaseUser.Certificate

Fore Syntax

Certificate : String;

Fore.NET Syntax

Certificate : string;

Description

The Certificate property assigns valid certificate to user used to login.

Fore Example

Executing the example requires a form with the EditBox component with the EditBox1 identifier and the Button component with the Button1 identifier.

Add links to the Metabase system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Value: String;
    User: IMetabaseUser;
    Security: IMetabaseSecurity;
Begin
    Security := MetabaseClass.Active.Security;
    User := Security.ResolveName(
"ADMIN"As IMetabaseUser;
    value := EditBox1.Text;
    User.Certificate := Value;
End Sub Button1OnClick;

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

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Metabase;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    
Var
    Value: String;
    User: IMetabaseUser;
    Security: IMetabaseSecurity;
Begin
    Security := Self.Metabase.Security;
    User := Security.ResolveName(
"ADMIN"As IMetabaseUser;
    value := TextBox1.Text;
    User.Certificate := Value;
End Sub;

See also:

IMetabaseUser