IAccessAttributeValue.Value

Syntax

Value(Index: Integer): Boolean;

Parameters

Index. Index in the bit access mask corresponding to security subject.

Description

The Value property determines value of access permission.

Comments

The True value means that corresponding permissions exist, the False value means they do not.

Example

Executing the example requires an MDM dictionary with the NSI_1 identifier. The dictionary is created in the "RDS" MDM repository.

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObjectDescriptor;
    AOS: IAccessObjectSecurity;
    Iterator: IAccessElementsIterator;
    Element: IAccessElement;
    AttributeValue: IAccessAttributeValue;
Begin
    MB := MetabaseClass.Active;
    Object := MB.ItemByIdNamespace("OBJ12152", MB.ItemById("RDS").Key);
    AOS := Object.GetSecurity;
    Iterator := AOS.GetElements;
    Iterator.Next;
    Element := Iterator.Current.Edit;
    AttributeValue := Element.AttributeAccess(AccessElementAttributes.Write);
    AttributeValue.Value(0) := False;
    AttributeValue.Value(1) := False;
    Element.AttributeAccess(AccessElementAttributes.Write) := AttributeValue;
    Element.Apply(AccessElementApplyOptions.ByLevel);
End Sub UserProc;

After executing this example access to write the first element and all elements located on the same level are forbidden for the first two security subjects.

See also:

IAccessAttributeValue