Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

1 vote

Comments

Have anyone find the solution for this questions ?


Accepted answer

Permanent link
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

1 vote


4 other answers

Permanent link
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.

2 votes

Comments

Might not need that level of detail, e.g. permission inheritance rules and multiple roles and all that.
I just need the state of the "checkboxes" on each level, like it is available in the Process editor.

What I did for now was downloading the process XML and some manual parsing - but that's painful and limited.
So how does the process editor do it? There is a tree and a table view (if configured for a level), maybe I can steal some code from there?

Thanks for any hint & regards
  Florian




Permanent link
 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?

0 votes

Comments

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.
 

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

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.

Florian mentions a method, but that does only work for the user that is logged into the repository.


Permanent link
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

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.

0 votes


Permanent link
Another approach is to use the Reportable REST API described here:

e.g.
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.

 

0 votes

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 169
× 51

Question asked: Jul 17 '13, 7:55 a.m.

Question was seen: 8,532 times

Last updated: Nov 27 '15, 8:36 p.m.

Confirmation Cancel Confirm