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

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

This widget could not be displayed.

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
   

This widget could not be displayed.

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.

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,319 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you