ISecurityLabels.Value

Syntax

Value([Subject: ISecuritySubject = Null]): Integer;

Parameters

Subject - optional parameter that determines a security subject (user, group). By default - a current user.

Description

The Value property returns the mask value for the security subject, passed by the Subject parameter in decimals.

Comments

If the security subject is not associated with any bit of the mask, the property returns 0 value.

For the user the ValueStr value returns the value of the mask including all groups in which the user is included and for which the bit of the mask is associated.

Examples of working with the access permissions are given in the following subsections: Control access permissions to elements and Control access permissions to attributes.

Example

Sub Main;

Var

MB: IMetabase;

MDesc: IMetabaseObjectDescriptor;

SecDesc: ISecurityDescriptor;

SecLab: ISecurityLabels;

i: Integer;

Begin

MB:=MetabaseClass.Active;

MDesc:=MB.ItemById("Dim_1");

SecDesc:=MDesc.SecurityDescriptor;

SecLab:=SecDesc.LabelSecurity;

i:=SecLab.Value(MB.Security.Users.Item(1));

End Sub Main;

After executing the example the "i" variable contains mask value for the second user of current repository. An object that contains security label is a table dictionary with the Dim_1 identifier.

See also:

ISecurityLabels