IMetabaseGroup.Attributes

Syntax

Attributes: IABACAttributeInstances;

Attributes: Prognoz.Platform.Interop.ABAC.IABACAttributeInstances;

Description

The Attributes property returns system and custom attributes of groups of users.

Comments

The property is read-only.

To work with the group attributes collection, use the IMetabaseUsers.Attributes property.

Example

To execute the example, add links to the ABAC, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Group: IMetabaseGroup;
    Groups: IMetabaseGroups;
    Attr: IABACAttributeInstance;
    i, Count: Integer;
Begin
    MB := MetabaseClass.Active;
    Groups := MB.Security.Groups;
    Group := Groups.Item(
0);
    Count := Group.Attributes.Count;
    
For i := 0 To Count-1 Do
        Attr := Group.Attributes.Item(i);
        Debug.WriteLine(Attr.Name(MB.CurrentLocale));
    
End For;
End Sub UserProc;

Imports Prognoz.Platform.Interop.ABAC;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Group: IMetabaseGroup;
    Groups: IMetabaseGroups;
    Attr: IABACAttributeInstance;
    i, Count: Integer;
Begin
    MB := Params.Metabase;
    Groups := MB.Security.Groups;
    Group := Groups.Item[
0];
    Count := Group.Attributes.Count;
    
For i := 0 To Count-1 Do
        Attr := Group.Attributes.Item[i];
        System.Diagnostics.Debug.WriteLine(Attr.Name[MB.CurrentLocale]);
    
End For;
End Sub;

After executing the example the console displays names of all system and custom attributes of groups of users.

See also:

IMetabaseGroup