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

Web client api to know the permissions of the logged in user

Hi,

Is there an api which gives the permissions of the logged in user i.e. JazzAdmins, JazzProjectAdmins or JazzUsers.

Thanks,
Sharoon

0 votes



3 answers

Permanent link
Hi Sharoon,

I'm aware of some internal services that might help you out.
I'm not sure about API. Somebody from the repository team will have to answer that.

There is a service to get all available roles:
com.ibm.team.repository.web.client.internal.AdminClient.getAllRoles(...)
e.g.
https://jazz.net/jazz/service/com.ibm.team.repository.service.internal.IAdminRestService/allRoles

There is a service to get contributor details on a particular user (including their roles):
com.ibm.team.repository.web.client.internal.AdminClient.getContributorByUUID(...)
e.g.
https://jazz.net/jazz/service/com.ibm.team.repository.service.internal.IAdminRestService/contributorByUUID?uuid=_-jW-gLiMEduHfMLg-NAVCg

There is a utility method to get the item ID for the currently logged in user:
com.ibm.team.repository.web.client.session.getAuthenticatedContributor().itemId

HTH

Mike

0 votes


Permanent link
Hi Mike,

We were using
com.ibm.team.repository.web.ui.internal.Util.userIsAdmin()
till RTC 2.0.0.1, this doesnt seem to give the expected results in RTC 2.0.0.2.

Sharoon

Hi Sharoon,

I'm aware of some internal services that might help you out.
I'm not sure about API. Somebody from the repository team will have to answer that.

There is a service to get all available roles:
com.ibm.team.repository.web.client.internal.AdminClient.getAllRoles(...)
e.g.
https://jazz.net/jazz/service/com.ibm.team.repository.service.internal.IAdminRestService/allRoles

There is a service to get contributor details on a particular user (including their roles):
com.ibm.team.repository.web.client.internal.AdminClient.getContributorByUUID(...)
e.g.
https://jazz.net/jazz/service/com.ibm.team.repository.service.internal.IAdminRestService/contributorByUUID?uuid=_-jW-gLiMEduHfMLg-NAVCg

There is a utility method to get the item ID for the currently logged in user:
com.ibm.team.repository.web.client.session.getAuthenticatedContributor().itemId

HTH

Mike

0 votes


Permanent link
Hi Sharoon,

As discussed offline, the utility you are using is used in the Admin application. It works fine for me in the Jazz Foundation 2.0 (3.0) code base. One way to verify whether it works is by logging in as ADMIN (and then as a normal user) and visiting a user's profile.
e.g.
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.repository.viewUserProfile&itemId=_-jW-gLiMEduHfMLg-NAVCg

Only Admins will have the power to edit the "Repository Permissions" check boxes.

If there is indeed a problem, you will need to file a bug against the Repository component in Jazz Foundation.

0 votes

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,938

Question asked: Dec 11 '09, 5:01 a.m.

Question was seen: 7,059 times

Last updated: Dec 11 '09, 5:01 a.m.

Confirmation Cancel Confirm