ISecurityCategory.FindLevelByLabel

Syntax

FindLevelByLabel(CriticalityLabel: Integer): ISecurityLevel;

Parameters

CriticalityLabel. A criticality label, by which the search is executed.

Description

The FindLevelByLabel method searches for a level with the criticality label passed as the CriticalityLabel parameter.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    MU: IMetabasePolicy;
    MAccess: IMetabaseMandatoryAccess;
    SecCat: ISecurityCategory;
    SecLev: ISecurityLevel;
Begin
    MB := MetabaseClass.Active;
    MS := MB.Security;
    MU := MS.Policy;
    MAccess := MU.MandatoryAccess;
    SecCat := MAccess.Category(
0);
    SecLev := SecCat.FindLevelByLabel(
2);
    
If SecLev <> Null Then
        Debug.WriteLine(SecLev.Name);
    
End If;
End Sub UserProc;

After executing the example a security level with the "2" criticality label is searched for. A name of the found level is displayed in the development environment console if the search succeeded.

See also:

ISecurityCategory