ISecurityDescriptor.HasAccessMandatory

Fore Syntax

HasAccessMandatory: Boolean;

Fore.NET Syntax

HasAccessMandatory: boolean;

Description

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

Comments

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

Indicator of the fact whether the discretionary access control to the MDM dictionary elements is applied is determined by the ISecurityDescriptor.AccessSecured property.

Fore Example

Executing the example requires an MDM repository with the MDM identifier that contains an MDM table dictionary with the DICT identifier. The "Change of the security label and of the access control list of any object" privilege should be given to the user who executes the example.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObjectDescriptor;
    SD: ISecurityDescriptor;
    AOS: IAccessObjectSecurity;
Begin
    MB := MetabaseClass.Active;
    Object := MB.ItemByIdNamespace("DICT", MB.ItemById("MDM").Key);
    SD := Object.SecurityDescriptor;
    If SD.HasAccessMandatory Then
        AOS := Object.GetSecurity;
        AOS.RevokeHasAccessMandatory;
    End If;
End Sub UserProc;

Result of example execution: for the table MDM dictionary the mandatory access control for the elements will be disabled if it was enabled earlier.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Object: IMetabaseObjectDescriptor;
    SD: ISecurityDescriptor;
    AOS: IAccessObjectSecurity;
Begin
    MB := Params.Metabase;
    Object := MB.ItemByIdNamespace["DICT", MB.ItemById["MDM"].Key];
    SD := Object.SecurityDescriptor;
    If SD.HasAccessMandatory Then
        AOS := Object.GetSecurity();
        AOS.RevokeHasAccessMandatory();
    End If;
End Sub;

See also:

ISecurityDescriptor