IRdsDictionaryElements.Access

Syntax

Access(Element: Integer; Attribute: RdsAccessAttribute): Integer;

Parameters

Element. Element key, for which it is necessary to receive a value of security label by specified access attribute.

Attribute. Kind of access attribute, by which it is necessary to find out security label for the Element element.

Description

The Access property returns security label set for the Element element by the Attribute access attribute. Security label is returned in a decimal mode. This property is used if access is distributed for 32 or less security subjects.

Example

Executing the example requires an MDM repository NSI_1 that contains the MDM dictionary with the Dict_1 identifier. Control of access permissions is enabled to elements in a dictionary.

Sub Main;

Var

MB: IMetabase;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

Arr: IRdsDictionaryElementArray;

i: Integer;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;

DictInst := Dict.Open(Null);

Elements := DictInst.Elements;

Arr := Elements.Children(-2);

For Each i In Arr Do

Debug.WriteLine(Elements.Access(i, RdsAccessAttribute.DeleteAccess));

End For;

End Sub Main;

After executing the example values of a security label set for dictionary root elements by the attribute Permission to delete are displayed in the console window.

See also:

IRdsDictionaryElements