ISecuritySubject.MemberOf

Syntax

MemberOf: IMetabaseGroups;

Description

The MemberOf method returns a collection of the groups to which the given security subject is included.

Example

To execute the example, make sure that the security manager contains users.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MSec: IMetabaseSecurity;
    Users: IMetabaseUsers;
    Groups: IMetabaseGroups;
    Group: IMetabaseGroup;
Begin
    MB := MetabaseClass.Active;
    MSec := MB.Security;
    Users := MSec.Users;
    Groups := Users.Item(
0).MemberOf;
    
For Each Group In Groups Do
        Debug.WriteLine(Group.Name);
    
End For;
End Sub UserProc;

After executing the example the development environment console displays names of groups, in which the first user is included and registered in the security manager.

See also:

ISecuritySubject