CheckResInSecGroupByGrpID Method

Description

Checks if the specified resource is a member of the specified security group using the Microsoft Office Project Server 2003 security object.

Syntax

Function CheckResInSecGroupByGrpID( _
   ByVal user_guid As String, _
   ByVal lSecGroupID As Long _
) As Long

Parameters

Parameter Description

user_guid

Required String. The user GUID associated with the Project Server account of interest.

lSecGroupID

Required Long. The ID for the security group of interest, from MSP_WEB_SECURITY_GROUPS.WSEC_GRP_ID.

Return Value

The CheckResInSecGroupByGrpID method returns True (1) or False (0) as a Long (4-byte integer) value.

Example

The following example is for Microsoft Visual Basic 6.0; it checks if the resource with the specified GUID is in security group 4 (Project Managers).

Dim lResult as Long
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.CheckResInSecGroupByGrpID("{82F50D90-F5F0-4B5D-8384-839B98823D2F}", 4)
Set oSec = Nothing