IRubricatorSegmentsSet.GetAllowed

Syntax

GetAllowed(DesiredAccess: Integer; Attribute: IMetaAttribute; Selection: IDimSelection);

Parameters

DesiredAccess. Value that determines operations with segment elements, performance possibility of which must be checked.

Attribute. Attribute that determines dimension.

Selection. Dimension elements selection.

Description

The GetAllowed property is used to get a selection of dimension elements, which are available for executing of specified actions by the current user.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier that contains determined segments, and a indicator attribute with the COUNTRY identifier that refers to a dictionary.

Sub UserProc;
Var
    Mb: IMetabase;
    RubInst: IRubricatorInstance;
    Segs: IRubricatorSegments;
    Attr: IMetaAttribute;
    Dict: IMetabaseObject;
    DI: IDimInstance;
    Sel: IDimSelection;
Begin
    Mb := MetabaseClass.Active;
    RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    Segs := RubInst.Segments;
    Attr := RubInst.Rubricator.Facts.Attributes.FindById("COUNTRY");
    Dict := Attr.ValuesObject.Bind;
    DI := Dict.Open(NullAs IDimInstance;
    Sel := DI.CreateSelection;
    Sel.SelectAll;
    Segs.GetAllowed(MetabaseObjectPredefinedRights.Read, Attr, Sel);
    Debug.WriteLine(Sel.ToString);
End Sub UserProc;

After executing the example selection of elements, available for reading by the current user, is displayed in the console window.

See also:

IRubricatorSegmentsSet