IMetabasePolicy.MandatoryAccess

Syntax

MandatoryAccess: IMetabaseMandatoryAccess;

Description

The MandatoryAccess property returns mandatory access control settings of the security manager.

Comments

Use the SecurityDescriptor property to set up access permissions to objects.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Policy: IMetabasePolicy;
    MAccess: IMetabaseMandatoryAccess;
    Cat: ISecurityCategory;
    Lvl: ISecurityLevel;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    Policy := MS.Policy;
    
// Enable the use of mandatory access control method
    Policy.MandatoryAccessControl := True;
    MAccess := Policy.MandatoryAccess;
    
// Add security category with access levels
    Cat := MAccess.AddCategory("Category 1");
    Lvl := Cat.AddLevel(
0"Level 0");
    Lvl.Marking := 
True// Enable object marking
    Lvl := Cat.AddLevel(1"Level 1");
    Lvl.ExportAllowed := 
False// Disable object export
    Lvl := Cat.AddLevel(2"Level 2");
    Lvl.ExportAllowed := 
False// Disable object export
    Lvl.PrintAllowed := False// Disable object printing
    // Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example, a new category with three security conditions is created in the mandatory access control of the security manager. For each level there are different access parameters of export and print and also labels marking during export and print set.

See also:

IMetabasePolicy