Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get a list of repositories a user has access to

Michael House May 2, 2014

Part of a tool I'm creating requires getting a list of Fisheye repositories that each user has access to. It doesn't appear I can do this via the REST API. How can I retrieve this information? Where in the database or on the server is this information stored?

For example, I want to pass in a user name and retrieve a list of all the repositories that user can access in Fisheye.

I'm aware that there's no direct link between users and repos, but such a connection can be made through the groups the user belongs to and the groups allowed to access a repository.

So essentially I need to be able to:

1. Query groups a user is in

2. Query repos a group has access to

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Michael House May 11, 2014

Unfortunately the APIs do not cover this requirement entirely. In order to address this issue, I had to use both the API, and parsing of the config.xml.

1. I use the API function found here for getting the groups a user is in.

2. Parse the config.xml file found at /usr/fisheye_inst/config.xml to retrieve the repository information, including the repo name and the groups that have access to it.

With this information, I can tell which repositories a user has access to.

0 votes
AafrinA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 4, 2014

Hi Michael,

To query groups a user is in, you can use the following function in the FishEye API. Use the Lists user's group names to list the users group names

It is not possible to query repos a group has access to via the FishEye API.

Michael House May 4, 2014

If it's not possilbe with the API, is there another way? For example is it stored in a file somewhere on the server? Or perhaps in the database? Thanks for your answer so far.

TAGS
AUG Leaders

Atlassian Community Events