IMetabaseUser.Attributes

Syntax

Attributes: IABACAttributeInstances;

Description

The Attributes property returns system and custom user attributes.

Comments

The property is read-only.

To work with the user 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;
    User: IMetabaseUser;
    Users: IMetabaseUsers;
    Attr: IABACAttributeInstance;
    i, Count: Integer;
Begin
    MB := MetabaseClass.Active;
    Users := MB.Security.Users;
    User := Users.Item(
0);
    Count := User.Attributes.Count;
    
For i := 0 To Count-1 Do
        Attr := User.Attributes.Item(i);
        Debug.WriteLine(Attr.Name(MB.CurrentLocale));
    
End For;
End Sub UserProc;

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

See also:

IMetabaseUser