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:
|
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:
|
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.