Stash - Is there a way to make permissions stricter for particular branches or repositories?

We have a Development project. Inside the project we have repositories for a number of development projects. For the most part engineers should be able to create repositories and merge code, the sort of thing that WRITE access grants. But for certain ones such as the master branch or main-line development branches within repositories we need to lock down access. The documentation on Using Branch Permissions, Controlling Access and Branch Control Patterns shows how to add additional access. Is there a way to, for instance, set branch or repository permissions to be more restrictive than what is inherited rather than less?

1 answer

1 accepted

You can't set a repo's projects to be more restrictive than it's project's.  If you need a particular repo to be more secure than the others, put it in its own project (or, more obnoxiously, set the project permissions only to those that are shared by all repos, and add individual permissions to repos as needed).

You can further restrict a branch.  In fact, that's the only thing you can do to a branch, permissions-wise.  Any addition of permissions to a branch will grant write access to that branch ONLY to the people listed. They will still require write access on the repo (set either at the project or repo level).

So if the default for people in the engineering group was "WRITE" and I added branch permissions on master for User1 and User2 only they could merge or accept accept pull requests, but engineers would still have READ privileges?

And it works! Thank you very much

Exactly. :-) No problem!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,275 views 26 12
Join discussion

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