IRdsAttributeInstance.HasWriteAccess

Syntax

HasWriteAccess: Boolean;

Description

The HasWriteAccess property returns whether a current user has permissions to change elements values by this attribute.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Dict: IRdsDictionary;
    DictInst: IRdsDictionaryInstance;
    AttrsInst: IRdsAttributesInstance;
    AttrInst: IRdsAttributeInstance;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Dict := MB.ItemByIdNamespace("DICT_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
    DictInst := Dict.Open(NullAs IRdsDictionaryInstance;
    AttrsInst := DictInst.Attributes;
    For i := 0 To AttrsInst.Count - 1 Do
        AttrInst := AttrsInst.Item(i);
        Debug.Write("Attribute: " + AttrInst.Name);
        If AttrInst.HasReadAccess Then
            Debug.Write("; Read access is present");
        Else
            Debug.Write("; Read access is absent");
        End If;
        If AttrInst.HasWriteAccess Then
            Debug.Write("; Write access is present;");
        Else
            Debug.Write("; Write access is absent;");
        End If;
        Debug.WriteLine("");
    End For;
End Sub UserProc;

After executing the example a list of attributes available in the MDM dictionary is displayed in development environment console. Availability of permissions on reading and writing is specified for each attribute.

See also:

IRdsAttributeInstance