AddModifyGroup Method

Description

Adds or modifies a group using the Microsoft Office Project Server 2003 security object.

Syntax

Function AddModifyGroup( _
   ByVal grp_guid As String, _
   ByVal bstrGrpName As String, _
   ByVal bstrGrpDesc As String, _
   ByVal bstrDashboardURL As String, _
   ByVal bstrUserGUIDs As String, _
   ByVal bstrGlobalPerm As String, _
   ByVal bstrCatPerm As String, _
   Optional ByVal bstrADGroup As String = "0" _
) As Long

Parameters

Parameter Description

grp_guid

Required String. The security group GUID, as in WSEC_GRP_GUID in the MSP_WEB_SECURITY_GROUPS table. Set grp_guid to NULL if adding a new group.

bstrGrpName

Required String. The group name.

bstrGrpDesc

Required String. The group description.

bstrDashboardURL

Required String. The Web Part Page URL for the WSEC_GRP_DASHBOARD_URL field.

bstrUserGUIDs

Required String. Comma-separated list of resource IDs (these IDs are not GUIDs), as in WRES_ID from the MSP_WEB_RESOURCES table. This list contains all the resources selected in this group.

bstrGlobalPerm

Required String. The global permission settings for this group, in the format "101,2;102,1;". The string has the following parts:

  • 101 and 102 are the global permission settings, as in WSEC_FEA_ACT_ID from the MSP_WEB_SECURITY_FEATURES_ACTIONS table.
  • Value 2: Allow.
  • Value 1: Deny.

bstrCatPerm

Required String. The category security permission settings for the group, in the format "<101>508,2;509,1;<102>508,1;". The string has the following parts:

  • <101> and <102> are the category IDs.
  • 508 and 509 are the permission IDs.
  • Permission ID value 2: Allow.
  • Permission ID value 1: Deny.

bstrADGroup

Optional String. The Active Directory GUID for this group. If bstrADGroup is missing, the default value is "0".

Return Value

The AddModifyGroup method returns HRESULT as a Long (4-byte integer) value.

Remarks

See admin/sec_svr_groups.asp for how Project Server uses AddModifyGroup.

Example

The following example for Microsoft Visual Basic 6.0 creates a new group that uses a custom Web Part Page in Microsoft Windows SharePoint Services and has no Active Directory GUID.

Dim lResult as Long
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.AddModifyGroup("", "Group Name", "Group Description", _
          "http://WSSServerName:5555/sites/MS_ProjectServer_PublicDocuments/Shared%20Documents/GroupPage.aspx", _
          "44,45,46,47", "101,2;102,1", "<101>508,2;509,1;<102>508,1;")
Set oSec = Nothing

Note  For a discussion of Web Part Pages, see Overview: Project Server 2003 Web Parts.