Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Get Repository Permissions for logged in user via RTC API

Hi,
for some reporting purposes I would like to fetch via API the repository permissions that a logged in user (in the teamrepository object) currently has.

This code (which I adapted a little bit) only works if the user is JazzAdmin
http://www.joshuabambrick.com/assign-repository-permissions-rtc/

If the user is not JazzAdmin then a call to ExternalUserRegistryManager.fetchGroupsForUser(...) throws an exception, and not even the PermissionDeniedException (like described in the Javadoc) but a ServiceMethodInvocationError.

Any ideas how to solve this? Java API would be preferred but REST calls would also be ok.

Thank you

1

0 votes

Comments

 Also this post did not help: https://jazz.net/forum/questions/157888/how-to-get-repository-permissions-of-user-in-rtc-using-plain-java-api


For both solutions I need to have JazzAdmin permissions.


Accepted answer

Permanent link
 As it seems using ..userRegistryManager.isMember() throws an exception even if I am querying for data about the currently logged in user.
But if I use ...userRegistryManager.fetchGroups I get all the groups for the currently logged in user (wo having JazzAdmin permissions)
Ralph Schoon selected this answer as the correct answer

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

Question asked: Apr 18 '16, 10:30 a.m.

Question was seen: 2,242 times

Last updated: Jun 12 '16, 5:43 p.m.

Confirmation Cancel Confirm