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
|
Accepted answer
![]()
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
|
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