IRubricatorFactor.GetEffectiveRights

Syntax

GetEffectiveRights: Integer;

Description

The GetEffectiveRights method returns effective permissions of the current user for the indicator.

Comments

Effective permissions include all the operations, which are explicitly allowed for the user. The value that is returned by this method is represented by an access mask. Mask value is an 8-bit byte binary number reduced to decimal form. To check mask value, use values of the  MetabaseObjectPredefinedRights  enumerable type in combination with  CubeSpecificRights. To parse mask value implement the custom function that enables the user to compare separate mask bits to appropriate enumeration values. Examples of work with access mask are given in the Examples: Work with Access Mask section. When permissions for the indicator are distributed, the Read and Write operations are used.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. This database must have defined segments and contain an indicator with the 89817 key.

Sub UserProc;
Var
    Mb: IMetabase;
    RubInst: IRubricatorInstance;
    Fac: IRubricatorFactor;
Begin
    Mb := MetabaseClass.Active;
    RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    Fac := rubInst.GetFactData(89817).Factor;
    Debug.WriteLine(Fac.GetEffectiveRights);
End Sub UserProc;

After executing the example the console window displays effective permissions of the current user for the indicator with the specified key. The permissions are presented in decimal form.

See also:

IRubricatorFactor