ISecurityLabels.Value

Syntax

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

Parameters

Subject. The optional parameter that determines the security subject: user or group. By default - the current user.

Description

The Value property determines the security subject mask value sent by input parameter in decimal form.

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

Executing the example requires a table dictionary with the Dim_1 identifier.

Sub UserProc;
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 UserProc;

After executing the example the "i" variable contains mask value for the second user of the current repository.

See also:

ISecurityLabels