AccessAttribute(AttributeKey: Integer): String;
AttributeKey. Key of access attribute, by which it is necessary to find out a security label. As a parameter value, pass key of one of the basic attributes:: READACCESS, WRITEACCESS, DELETEACCESS, or ACCESSACCESS.
The AccessAttribute property returns a security label set by access attribute, which key is passed by the AttributeKey parameter.
Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier. Control of access permissions is enabled for dictionary elements.
Sub Main;
Var
MB: IMetabase;
Dict: IRdsDictionary;
DictInst: IRdsDictionaryInstance;
Attrs: IRdsAttributes;
Element: IRdsDictionaryElement;
Begin
MB := MetabaseClass.Active;
Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
DictInst := Dict.Open(Null);
Attrs := Dict.Attributes;
Element := DictInst.Elements.Item(1);
Debug.WriteLine(Element.AccessAttribute(Attrs.ReadAccess.Key));
Debug.WriteLine(Element.AccessAttribute(Attrs.WriteAccess.Key));
Debug.WriteLine(Element.AccessAttribute(Attrs.DeleteAccess.Key));
Debug.WriteLine(Element.AccessAttribute(Attrs.AccessAccess.Key));
End Sub Main;
After executing the example values of a security label set by all access attributes for the first dictionary element are displayed in the console.
See also: