GetResAllProjectsByPermission Method
Description
Returns a list of all the projects for which a specified user has the specified project permission using the Microsoft Office Project Server 2003 security object.
Syntax
Function GetResAllProjectsByPermission( _
ByVal res_id As Long, _
ByVal fea_act_id As Long, _
Optional ByVal fGetEntOnly As Long = 0 _
) As String
Parameters
Parameter | Description |
---|---|
res_id |
Required Long. The resource account ID (WRES_ID). |
fea_act_id |
Required Long. The project permission ID. |
fGetEntOnly |
Optional Long. Set to 1 (True) to return only enterprise projects (PROJ_ID). The default 0 (False) includes all projects (WPROJ_ID). |
Return Value
The GetResAllProjectsByPermission method returns a comma-separated list of project 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 all projects where the resource 122 can view issues (permission ID 1102). The example is for Microsoft Visual Basic 6.0.
Dim sResult as String
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
sResult = oSec.GetResAllProjectsByPermission(122, 1102)
Set oSec = Nothing