ISecurityPackage.GetAdminCredentials

Syntax

GetAdminCredentials(

Options: Integer;

LogonData: ISecurityPackageLogonData;

UserCredentials: ICredentials): ICredentials;

Parameters

Options. Parameter is not used. Reserved for the future.

LogonData. The security module parameters, used when connecting.

UserCredentials. The user's credentials, used when connecting.

Description

The GetAdminCredentials method creates administrator's credentials according to the connection parameters that are passed by the LogonData and the UserCredentials parameters.

Example

Sub Main;

Var

MB: IMetabase;

MBDef: IMetabaseDefinition;

Package: ISecurityPackage;

Session: ILogonSession;

Cred, ADMCred: ICredentials;

SPLD: ISecurityPackageLogonData;

Begin

MB := MetabaseClass.Active;

MBDef := MB.Definition;

Package := MBDef.Manager.Packs.FindById(MBDef.SecurityPackage).Package;

Session := MB.LogonSession;

Cred := Session.LogonCredentials;

SPLD := Session.LogonData;

ADMCred := Package.GetAdminCredentials(0, SPLD, Cred);

//...

End Sub Main;

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

See also:

ISecurityPackage