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

In Bitbucket, how can you tell which groups are in use?

Vik Solem April 25, 2016

We are using groups in active directory for access control on some repo's.  How can we show which groups are being used by which repo's?

We are changing our active directory configuration, and we'd like to change the access control so that we don't lose it when the old groups disappear.

3 answers

0 votes
Johannes Kilian
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.
April 28, 2016

As I've written a REST-Client Framework for Bitbucket for internal use, i prefer using the API wink

0 votes
Vik Solem April 28, 2016

SQL is much easier for me personally.  Would love to have a way to pull this from the back-end mysql database.... if it's there.

0 votes
Johannes Kilian
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.
April 25, 2016

I haven't seen anything like this as a complete solution.

What I would try is using Bitbucket-REST API (https://developer.atlassian.com/static/rest/bitbucket-server/4.5.2/bitbucket-rest.html)

A solution might be: /rest/api/1.0/admin/permissions/groups (haven't used this API yet ...)

Another solution might be:

  1. Get a list of all Bitbucket Projekts   (/rest/api/1.0/projects)
  2. Iterate over all projects and
    - get all Group-permissions for each project (/rest/api/1.0/projects/{projectKey}/permissions/groups)
    - get all Repositories for each project (/rest/api/1.0/projects/{projectKey}/repos)
      - Iterate over all repositories and 
        - get all Group-permissions for each repository (/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/permissions/groups)
        - get all Branches for each repository (/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/branches)
           - Iterate over all Branches and
                - get all Group-permissions for each branch (Hmmmm ... is this possible via API -haven't found it immediately...)

This requires a little scripting but should give you all you need
   

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events