RemoveCategory(Index: Integer): Boolean;
Index - index of a category.
The RemoveCategory method removes security category and indicates whether it was removed successfully.
Sub Main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
MAccess: IMetabaseMandatoryAccess;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
MU := MS.Policy;
MAccess := MU.MandatoryAccess;
MAccess.RemoveCategory(MAccess.CategoryCount - 1);
MS.Apply;
End Sub Main;
After executing this example the last security category is removed in the settings of mandatory access.
See also: