Wednesday, April 13, 2011 8:38 AM
I need to access the "Project Permissions" of pwa using the PSI. Is there something like SvcProject.Project.ProjectPermissions? The "SvcProject.Project.ProjectPermissions" is very hypothetical and I just created it to try to explain what I need. I need to give a resource permission on one specific project using the PSI. I know I can add resources to groups and categories using the PSI but this won't help in my case.
Any help much appreciated.
Saturday, April 16, 2011 7:42 AM
81 views with no answer! Please guys any help is appreciated. I have looked into the security web service in the psi and saw a SecurityProjectCategoriesDataSet which I think may help in my case. but as usual, no proper documentation explaining what this does. anyone has worked with it before? anyone can explain what it does?
Tuesday, March 27, 2012 3:23 PM
Same problem here! Have you done it already and could explain how you have done it?
Wednesday, March 28, 2012 7:02 PM
Using SecurityProjectCategoresDataSet is the way to go.
Basically, within the data set you have these main tables:
If you don't have a category for a given project already, you create a new one. If you don't have a user relation row for a specific resource, you create a new association (it tells the security service that this user is associated with this project and security category). Then you add a user permission row for each permission you want to grant.
There are plenty of examples out there. One of them would be GrantPermissionsToProject OOB custom activity for SampleProposal2 in the 2010 SDK. This is the best example.
This link has some code too, although it doesn't do exatly what you need, but it will give you an idea how to manipulate datasets/tables:
NOTE: depending on whether a project security category already exists or not for a given project, you would want to use either CreateProjectCategories or UpdateProjectCategories methods. If you don't get the logic right, you'll get an exception.
Hope this helps!
- Proposed As Answer by Rockmus Wednesday, March 28, 2012 8:10 PM