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:
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
Jared Burns (4.5k●2●9)
| answered Mar 12 '14, 4:57 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. Jared Burns selected this answer as the correct answer
|
4 other answers
Jared Burns (4.5k●2●9)
| answered Jul 18 '13, 4:48 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 Might not need that level of detail, e.g. permission inheritance rules and multiple roles and all that.
|
Jared Burns (4.5k●2●9)
| answered Jul 17 '13, 1:29 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Florian Georg
commented Jul 17 '13, 2:19 p.m.
unfortunately, this is not enough - I need a table with all available (advisable) operations.
Basically what the process configuration editor shows under TeamConfiguration > Permissions (or Timeline/Iteration > Permissions). Just presented in a different way.
The idea is to have a full (potentially quite long) list of which actions a role is allowed to perform on any given ProjectArea/TeamArea/Timeline/Iteration.
Madhu Prabhu
commented Apr 02 '15, 12:53 p.m.
I agree the 'Runtime Report' just shows the project/team areas and the roles a user has. We would like a similar display/print capability of roles both custom and default and their respective permissions for any given project/team area for audit purposes........
Ralph Schoon
commented Nov 23 '15, 11:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Carefully reading the answers by Jared tells you, that there is no such API. It appears, you have to get the process XML and read the data from there. The caveat is, that it refers to internal ID's for the Extension Points and Operation ID’s and it is also not trivial to work with the XML. However, Jareds statement is clear that we don't have a different API.
|
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.
|
Nick Edgar (6.5k●7●11)
| answered Nov 23 '15, 11:32 a.m.
JAZZ DEVELOPER edited Nov 23 '15, 11:34 a.m.
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 Thank you Nick for you response, Is this one the same as in Process configuration in xml format that we get in the RTC client
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Have anyone find the solution for this questions ?