I have branching model enabled. Let me know how to set this permission scheme:
I do not want anyone accept "administrator" group to create branches without prefixes like - "feature/", "bugfix/", "hotfix/".
I tried to set this:
- No one listed in *
- Allow write permission to everyone to write on "bugfix/*"
But this setting doesn't allow anyone to write to "bugfix/*".
Hey Pankaj!
The reason your branch permissions are failing is that setting "*" will trump all other settings, essentially "*" means no one can write to ANY branch as this wildcard operator will select everything.
You will need to define "bugfix/*" branch name and only add administrators with write permissions, this will mean that any branch that has "bugfix/" prefix will have these permissions applied and will only allow administrators to create these.
More information can be found here:
https://confluence.atlassian.com/bitbucketserver/branch-permission-patterns-776639814.html
Hope this helps.
- Ben (Bitbucket Cloud Support)
May be that I was not clear. Rephrasing.
Only "Administrator" should be able to create branches without prefixes like - "feature/", "bugfix/", "hotfix/". Other people should be allowed branches with the mentioned prefixes.
How can I configure this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Pankaj,
I've just tested on my end what you want to achieve and I believe I have a solution:
Essentially what this will achieve, is that admins will be able to create any branch as they are explicitly identified to be able to do so with the "*" pattern, this pattern matches any text whatsoever.
Non-admins are not present on the "*" pattern, they can only create branches where they are explicitly defined, hence they can only create "bugfix, hotfix etc" as you have defined these.
Please create these branch permissions and test with a user, I have attached a screenshot below to show you what I mean.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What I did was something similar. But team members could not push to bugfix and feature branches using my settings. My settings were:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Pankaj,
Yes, this is because the "*" search pattern will match all branch names and will take precedence over every other branch restriction that you define (as indicated by the yellow "!" icon next to the restriction names indicating a conflict).
Therefore as soon as Bitbucket Cloud sees that NO ONE is able to write to any branches (indicated by "*" search pattern), all the other restrictions you have defined are canceled out, and no one is able to write to any branches.
Did you manage to try out the configuration I had suggested?
Cheers
- Ben (Bitbucket Cloud)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nope. Just tried to assign "Administrator" to "*" pattern. And this is still overriding the permission settings for other patterns.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Pankaj,
By defining "Everybody" in those other pattern types this also includes "Administrators" and creates another conflict. Are you able to define a single person in Write access for one of those branch patterns, then attempt to have them push to see if it works? The idea is that Administrator group is defined explicitly to be able to create any branch they desire, then individual user groups ie Developers are allowed write access to other pattern types (for example as shown in the screenshot which I have provided, where I have tested this and it has worked).
If this still does not work, please let me know.
Cheers!
-Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ben This worked. Thanks a lot. I created a non-admin group and assigned that with write permission on prefixed patterns. And this worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.