ISecurityPackage.GetAdminCredentials

Syntax

GetAdminCredentials(

Options: Integer;

LogonData: ISecurityPackageLogonData;

UserCredentials: ICredentials): ICredentials;

Parameters

Options. This parameter is not used. Reserved for the future.

LogonData. Security module parameters used on connection.

UserCredentials. User credentials used on connection.

Description

The GetAdminCredentials method creates credentials of the administrator in accordance with connection parameters sent by input parameters.

Example

Sub UserProc;
Var
    MB: IMetabase;
    MBDef: IMetabaseDefinition;
    Package: ISecurityPackage;
    Session: ILogonSession;
    Creds, ADMCreds: ICredentials;
    SPLD: ISecurityPackageLogonData;
Begin
    MB := MetabaseClass.Active;
    MBDef := MB.Definition;
    Package := MBDef.Manager.Packs.FindById(MBDef.SecurityPackage).Package;
    Session := MB.LogonSession;
    Creds := Session.LogonCredentials;
    SPLD := Session.LogonData;
    ADMCreds := Package.GetAdminCredentials(0, SPLD, Creds);
    //...
End Sub UserProc;

After executing the example credentials for administrator of the current repository are obtained based on the current connection parameters.

See also:

ISecurityPackage