IMetabasePolicy.PrivilegeName

Syntax

PrivilegeName(Index: Integer): String;

PrivilegeName[System.Int32]: System.String;

Parameters

Index. Privilege index.

Description

The PrivilegeName property returns element privilege by index.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    MU := MS.Policy;
    
For i := 0 To MU.PrivilegeCount - 1 Do
        Debug.WriteLine(MU.PrivilegeName(i));
    
End For;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
    i: Integer;
Begin
    MB := Params.Metabase;
    MS := MB.Security;
    MU := MS.Policy;
    
For i := 0 To MU.PrivilegeCount - 1 Do
        System.Diagnostics.Debug.WriteLine(MU.PrivilegeName[i]);
    
End For;
End Sub;

After executing this example privileges names available in a security manager are displayed in the development environment console.

See also:

IMetabasePolicy