Stash: How can I prevent users from deleting a remote Git branch?

We have users that have write access to the repository, but they also have rights to delete a remote branch. How can we prevent them from deleting remote brances?

2 answers

1 accepted

Hi Alex,

The Stash Refchange Settings plugin looks like it'll do exactly what you want: https://bitbucket.org/atlassianlabs/stash-refchange-settings-plugin

It adds a "Branches and tags" configuration screen to your repositories:

However, it hasn't been officially released to the Atlassian Marketplace yet, so you'd need to build it from source and treat it as experimental.

To build it from source, install a recent JDK, the Atlassian SDK and run atlas-mvn clean install from the plugin repository. The built plugin artifact will be created at target/stash-refchange-settings-plugin-VERSION.jar and can be installed in your Stash instance via the plugin management console.

cheers,

Tim

I have just downloaded Atlassian Plugin SDK v5.0.4 but do not see a POM file in the repository folder, so running "atlas-mvn clean install" did not help. I noticed a number of batch files in the repository/bin folder but none with the name "refchange". Am I missing something?

I belive we have the same need as Alex Rodrigues does.
I found this similar question:
https://answers.atlassian.com/questions/272092/how-do-i-prevent-people-from-deleting-branches-in-the-gui

But it seems, to deny deletion of specific branches is not possible yet. :/

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,764 views 1 5
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