ISecuritySubject.MemberOfO

Syntax

MemberOfO(Options: Integer): IMetabaseGroups;

Parameters

Options. Parameters of getting a list of groups.

Description

The MemberOfO method returns a collection of groups in which the given security subject is included taking into account defined parameters of getting groups.

Comments

Determine one of the SecuritySubjectMemberOfO enumeration values as the Options parameter value.

Example

Executing the example requires that the DOMAIN\TESTUSER domain user is added to the repository security manager.

Sub UserProc;
Var
    MB: IMetabase;
    User: ISecuritySubject;
    Groups: IMetabaseGroups;
    Group: IMetabaseGroup;
Begin
    MB := MetabaseClass.Active;
    User := MB.Security.ResolveName("DOMAIN\TESTUSER");
    Groups := User.MemberOfO(SecuritySubjectMemberOfO.NoNTFetch);
    For Each Group In Groups Do
        Debug.WriteLine(Group.Name + " (" + (Group.IsNT ? "Domain group of users)" : "Group of users created in the security manager)"));
    End For;
End Sub UserProc;

On executing the example a list of groups in which the specified repository user is included will be obtained. Names and types of groups will be displayed to the development environment console. The list of groups is obtained without calling the directory service.

See also:

ISecuritySubject