RemoveLevel(Index: Integer): Boolean;
Index - index of the security level that needs removing.
The RemoveLevel method removes the security level and indicates whether the removal succeeded.
Sub Main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
Cat: ISecurityCategory;
MAccess: IMetabaseMandatoryAccess;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
MU := MS.Policy;
MAccess := MU.MandatoryAccess;
Cat := MAccess.Category(0);
Cat.RemoveLevel(1);
MS.Apply;
End Sub Main;
After executing the example in the first security category, the second level is removed.
See also: