Is there API / a service to get process operation permissions per role?
I need to create a kind of "audit" report using the Plain Java Client API.
The idea is simple - for each Process Area, list the available roles and their permitted operations (Save WorkItem, Deliver etc...).
However, I could not find API for doing that - e.g. the only thing I could do to was loading the process source XML, then parse through all the config data.
I tried:
com.ibm.team.process.client.IProcessClient. getPermittedActions(IProcessArea processArea, java.lang.String operationId, java.lang.String[] actions, org.eclipse.core.runtime.IProgressMonitor monitor)
This comes close, but needs an operationID (where to get all those from? Pluginregistry?) and only works for the current user - I need to get info for all available roles (and probably all customization levels - team ares, iterations etc.)
Is there a service / API to get process operation permissions per role?
Thanks
Florian
Accepted answer
As of RTC 4.0.3, there are two more answers to this question:
1. The tool now shows the history of changes to the process XML (including Permissions) in the project/team area editor in the web UI.
2. This history can be accessed via a REST interface. https://jazz.net/wiki/bin/view/Main/ProjectAreaHistory. This interface should be considered a "provisional API", but it will get the job done.
1. The tool now shows the history of changes to the process XML (including Permissions) in the project/team area editor in the web UI.
2. This history can be accessed via a REST interface. https://jazz.net/wiki/bin/view/Main/ProjectAreaHistory. This interface should be considered a "provisional API", but it will get the job done.
4 other answers
We don't have any API that answers this question for other users, as you've found.
I'm not sure the level of detail you're trying to capture here, but if you want to see the *effective* permission that each role has for each operation in each team area/timeline/iteration, you're talking about basically re-implementing the runtime that resolves permissions in Jazz. That's a major undertaking.
Comments
The RTC Eclipse client can generate a "Runtime Report" of the project area which includes all this information. You can export the report via a context menu action on the project area in the Team Organization view. Does this give you what you need or do you need more?
Comments
To get the list of role assignments for members of project areas and their team areas, you can use the Process API described here: https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi.
For example:
List the project areas on jazz.net/jazz: https://jazz.net/jazz/process/project-areas
For a given project area (the one named "Rational Team Concert" in this case), follow the URL in its members-url element: https://jazz.net/jazz/process/project-areas/_1w8aQEmJEduIY7C8B09Hyw/members
You can dig down to team area level similarly, e.g. follow the team-areas-url: https://jazz.net/jazz/process/project-areas/_1w8aQEmJEduIY7C8B09Hyw/team-areas
then follow the members-url of the "Development" team area: https://jazz.net/jazz/process/project-areas/_1w8aQEmJEduIY7C8B09Hyw/team-areas/_-4K1ANvOEeOpyp2dCwnpsA/members
To get more details about which operations are permitted for a given role, you'd need to get the process configuration, e.g. using the ProcessAreaHistory API mentioned above.
Another approach is to use the Reportable REST API described here:
e.g.
Schema for Foundation level items: https://jazz.net/jazz/rpt/repository/foundation?metadata=schema
Project area level role assignments: https://jazz.net/jazz/rpt/repository/foundation?fields=foundation/projectArea/(itemId|name|roles/id|roleAssignments/(contributor/userId|contributorRoles/id))&size=10
Team area level role assignments: https://jazz.net/jazz/rpt/repository/foundation?fields=foundation/projectArea/(itemId|name|allTeamAreas/(itemId|name|roleAssignments/(contributor/userId|contributorRoles/id)))&size=10
The last two could be combined into a single request to get role assignments and both project and team area levels simultaneously.
Comments
pumtat boonyakarn
Nov 27 '15, 8:35 p.m.