ISecurityDescriptor.HasAccessMandatory

Syntax

HasAccessMandatory: Boolean;

Description

The HasAccessMandatory property returns whether mandatory access control is used for MDM dictionary elements.

Comments

The property value corresponds with the value of IRdsDictionary.HasMandatoryAccess.

The ISecurityDescriptor.AccessSecured property determines whether discretionary access control is applied to MDM dictionary elements.

Example

Executing the example requires that the repository contains an MDM dictionary with RDS_DICT identifier. The user executing the example should have the privilege Changing Security Label and Access Control List of Any Object.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObject;
    SD: ISecurityDescriptor;
    Dict: IRdsDictionary;
    MObj: IMetabaseObjectDescriptor;
Begin
    // Get the current repository
    MB := MetabaseClass.Active;
    // Get MDM dictionary
    MObj := MB.ItemById("RDS_DICT");
    Object := MObj.Edit;
    Dict := Object As IRdsDictionary;
    // Get access control parameters
    SD := Object.SecurityDescriptor;
    // Check if mandatory access control is used for MDM dictionary elements
    If SD.HasAccessMandatory Then
        // Disable application of mandatory access control if it is used
        Dict.HasMandatoryAccess := False;
        // Save changes
        Object.Save;
        SD.Apply(True);
    End If;
End Sub UserProc;

Example execution result: mandatory access control is disabled for MDM dictionary if it was enabled earlier.

See also:

ISecurityDescriptor