It's all about the answers!

Ask a question

Get Repository Permissions for logged in user via RTC API

Marko Tomljenovic (31648109) | asked Apr 18 '16, 10:30 a.m.
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

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

Marko Tomljenovic commented Apr 18 '16, 10:36 a.m.

 Also this post did not help:

For both solutions I need to have JazzAdmin permissions.

Accepted answer

permanent link
Marko Tomljenovic (31648109) | answered May 03 '16, 4:19 p.m.
 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

Your answer

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