GetModelsResCanView Method

Description

Returns a list of the models for which the specified user has a specified model permission using the Microsoft Office Project Server 2003 security object.

Syntax

Function GetModelsResCanView( _
   ByVal lResID As Long, _
   ByVal act_id As Long _
) As String

Parameters

Parameter Description

lResID

Required Long. The resource ID from MSP_WEB_RESOURCES.WRES_ID.

act_id

Required Long. The permission ID.

Return Value

The GetModelsResCanView method returns a comma-separated list of model IDs as a String value.

Remarks

For a list of permission IDs, see PDS Permissions in the Project Data Service reference.

Example

The following example returns a list of model IDs that user 121 is authorized to view and modify (permission ID 506). The example is for Microsoft Visual Basic 6.0.

Dim sResult as String
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
sResult = oSec.GetModelsResCanView(121, 506)
Set oSec = Nothing