About the Project Server Security Object

Microsoft® Office Project Server 2003 provides a security object API that developers can use to write Project Data Service (PDS) extensions.

The documentation for each method includes an example for Microsoft Visual Basic 6.0 that shows how to instantiate PjSvrSecurity and then call the method. The examples create an instance of the security object as follows:

Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")

The string "PjSvrSecurity.PjSvrSecurity" is the COM identity (the ProgID) of the PjSvrSecurity object, which does not specify a version. If you look in the registry on the computer that is running Project Server, the key for the current security object version is HKEY_CLASSES_ROOT\PjSvrSecurity.PjSvrSecurity\CurVer where the default value is "PjSvrSecurity.PjSvrSecurity.1". The ".1" is the version number of the COM object. You could also specify the version when you create an instance of the object:

Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity.1")

In this case either statement works the same way because there is only one version of the COM object. After you create an instance of PjSvrSecurity, the first method you must call is SetDBConnection.

Note  Some of the PjSvrSecurity object methods are not recommended for use by external applications. These methods are either designed for internal use only by the PDS, or there are equivalent PDS methods that should be used instead. This reference provides basic documentation for the methods that are not recommended, but the parameters are not explained.

The following table lists all of the methods for the Project Server security object PjSvrSecurity. Methods that are not recommended are labeled (NR).

A G GetResourcesResCanViewByViewID      
ActivateAccount     (NR) GetAllCategoryActions     GetResourcesResCanViewByViewIDFromList      
AddCustomSubMenu     (NR) GetAllFeaturesAndActions     (NR) GetSPAllGlobalPermissions      
AddCustomTopMenu     (NR) GetAllGlobalActions     (NR) GetSPAllPermissionsOnCategory      
AddModifyCategory     (NR) GetAllGroups     (NR) GetSPListedGlobalPermissionSettings      
AddModifyGroup     (NR) GetAllGroupsAUserIsIn     H - I
AddNTAccount     (NR) GetAllUsers     HashData    
AddPJAccount     (NR) GetAllUsersInAGroup     IsAccountNameConflict    
AddResource     (NR) GetDocIssueProjectsForResource     IsGroupNameConflict    
AddTemplate     GetEnterpriseMode     M
C GetModelsResCanView     MergeAccount    
CheckOrgPermission     GetNumberOfResourcesResCanViewByViewID     ModifyAccount    
(NR) CheckProjectViewPermission     (NR) GetOrgAllPermissions     ModifyResource    
CheckResInSecGroupByGrpID     (NR) GetOrgMenu     ModifyTemplate    
CheckSPGlobalPermission     (NR) GetProjectCentralMenu     P
CheckSPObjectListPermission     (NR) GetResAllAssignmentsByAssignmentView     (NR) PDS_PSAddUsersToGroups    
CheckSPObjectPermission     (NR) GetResAllAssignmentViews     (NR) PDS_PSDelUsersFromGroups    
CleanupExtendedProjectViewTables     GetResAllEntProjectsByTwoPermissions     (NR) PDS_PSGetUsersInGroup    
CleanupExtendedResourceViewTables     (NR) GetResAllPortfolioViews     (NR) PDS_PSGroupsGet    
D - E GetResAllProjectsByPermission     (NR) PDS_PSNewUser    
DeleteAccount     GetResAllProjectsByPortfolioView     R - V
DeleteCategory     GetResAllProjectsByProjectView     ResetAccountPassword    
DeleteCustomMenu     (NR) GetResAllProjectViews     SetCallerWResID    
DeleteGroup     (NR) GetResAllResourceRegisterViews     SetDBConnection    
DeleteProject     (NR) GetResAllVisionViews     TransformWindowsAccountForPS    
DeleteTemplate     (NR) GetResourcesByGlobalPermission     ValidateAccountName    
EnableFeature     (NR) GetResourcesForDocIssueProject     ValidateAuthenType