IMetabaseGroup.IsMember

Syntax

IsMember(Subject: ISecuritySubject): Boolean;

Parameters

Subject - a security subject that should be checked.

Description

The IsMember method checks if the specified security subject is present in the current group of users.

Comments

The method returns True if the security subject that is passed as the Subject parameter, is a member of this group of users.

Example

Sub Main;

Var

MB: IMetabase;

MS: IMetabaseSecurity;

MG: IMetabaseGroups;

MGroup: IMetabaseGroup;

SSS: ISecuritySubjects;

SS: ISecuritySubject;

S: String;

Begin

MB:=MetabaseClass.Active;

MS:=MB.Security;

MG:=MS.Groups;

MGroup:=MG.Item(0);

SSS:=MS.AllUsers;

SS:=SSS.Item(200);

If MGroup.IsMember(SS) Then

s:="Yes";

Else

s:="No";

End If;

End Sub Main;

After executing this example the "s" variable contains "Yes", if the user with "200" index is a member of the first group of users.

See also:

IMetabaseGroup