ISecurityCategory.FindLevelByLabel

Syntax

FindLevelByLabel(CriticalityLabel: Integer): ISecurityLevel;

Parameters

CriticalityLabel - a criticality label, by which the search is performed.

Description

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

Example

Sub Main;

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(4);

If SecLev <> Null Then

Debug.WriteLine(SecLev.Name);

End If;

End Sub Main;

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

See also:

ISecurityCategory