We use LDAP for authentication and use a separate LDAP group for each repository access.
For example there is repoA repository and "repo_a" LDAP group. If a user belongs to that group then he can access repoA.
Assume that user X belongs to repo_a and user Y don't. If user X fork repoA (we want to work with forking workflow), then he can add user Y to his fork. Since his fork also is repoA, we don't want user Y to access repoA because user Y is not in repo_a group.
Is there a way to prevent users to add any developer to their fork?
Hi Serdar, there's no way to restrict that. Once you allow someone to fork a repo, this is a new repository and they control who they can invite. He can decide to inherit the permissions from the original repo, but there is no way to enforce that.
You can disable the forking option, though, if you don't want your developers to create forks at all.
Hope that helps!
Thanks for the answer. Yes we learned as you say from Atlassian support. They also suggested a solution:
Pertaining your question as to whether you can setup Forking permissions in a way that would enforce only users under a certain LDAP group to have access to forked repositories we can confirm that it is not possible.Forked repositories behave as separate repositories, with their own permissions setup.
What you can do instead is delegate Bitbucket Admins that would have permissions to setup the Repositotires and their Forks, enforcing whichever permission sets you require, however that would strip away permissions to the other users for forking, leaving them with access to work on the repositories and forks.
The solution did not seem very useful to us. Then we decided to allow users to fork repos, but in the mean time we implemented an auditing mechanism. We watch Bitbucket audit logs and report conflicts with LDAP rules.
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...
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!
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