ClassificationLabel(Category: ISecurityCategory): ISecurityLevel;
Category. Mandatory access control category.
The ClassificationLabel property determines a classification label for this category.
Security category is sent by the Category parameter.
Sub UserProc;
Var
MB: IMetabase;
Lic: Object;
User: IMetabaseUser;
Tok: IAccessToken;
SecCat: ISecurityCategory;
SecLevel: ISecurityLevel;
Begin
MB := MetabaseClass.Active;
// Get license to be able to work with the security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
// The user, for whom mandatory access control is set up
User := MB.Security.Users.Item(0);
Tok := User.Token;
SecCat := MB.Security.Policy.MandatoryAccess.Category(0);
SecLevel := SecCat.Level(3);
Tok.ClassificationLabel(SecCat) := SecLevel;
MB.Security.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the fourth level of access is set for the first category of the mandatory access control for the specified user.
See also: