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

how to get repository permissions of user in RTC using plain java api

 Hi,

In RTC we are having repository permissions (JazzAdmins,  ) for a user. I wanted to get all repository permissions assigned for user using Java API. These report is necessary for me in RTC license management. Can some one help me out. I was able to get the licenses assigned for a user with following:
 ist<IContributor> contributors = teamRepository.contributorManager().fetchAllContributors(monitor);
ILicenseAdminService licenseService = (ILicenseAdminService) ((TeamRepository)teamRepository).getServiceInterface(ILicenseAdminService.class);
IContributorLicenseType[] licenseTypes = licenseService.getLicenseTypes();
String[] assignedLicenseIds = licenseService.getAssignedLicenses(contributors.get(i));.

Now I need to get the repository permissions which could not get. I tried multiple option but failed to retireve. Can you help me out.

Thanks and Regards,
Vijay Reddy.

1

0 votes


Accepted answer

Permanent link
Our users are in an External User Registry (LDAP), and I get them this way:

        IExternalUserRegistryManager ieurm = teamRepository.externalUserRegistryManager();
        List<String> groups;

                groups = Arrays.asList(ieurm.fetchGroupsForUser(userid, monitor));

Vijay Reddy Gaddam selected this answer as the correct answer

0 votes


3 other answers

Permanent link

Having similar issue. 

0 votes


Permanent link
 Finally solution I made is:

IExternalUserRegistryManager userRegistryManager = teamRepository.externalUserRegistryManager();
IExternalGroup[] externalGroups = userRegistryManager.listApplicationGroups(null);
for (IExternalGroup iExternalGroup : externalGroups) {
if(userRegistryManager.isMember(contributors.get(i).getUserId(), iExternalGroup.getName(), monitor)){
System.out.print("\t - " + iExternalGroup.getName());
}
}

0 votes


Permanent link
 Hello,
I think this article http://www.joshuabambrick.com/assign-repository-permissions-rtc/
might help you.

Eric

1 vote

Comments

 It was very helpful. Thank you Eric.


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,926
× 411
× 169

Question asked: Jul 10 '14, 12:46 a.m.

Question was seen: 8,886 times

Last updated: Nov 06 '20, 1:54 a.m.

Related questions
Confirmation Cancel Confirm