Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set this permission - No permission for * but allow bugfix/*?

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

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/*".

 

 

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2022

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)

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2022

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?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2022

Hey Pankaj,

 

I've just tested on my end what you want to achieve and I believe I have a solution:

  • Create a branch match pattern "*": Assign the admin group to this pattern
  • Create branch match patterns "bugfix/*, hotfix/* etc": Assign the non-admin group to this pattern

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.

screenshot.png


Cheers!

- Ben (Bitbucket Cloud Support)

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

What I did was something similar. But team members could not push to bugfix and feature branches using my settings. My settings were:

Screenshot from 2022-03-10 11-15-43.pngScreenshot from 2022-03-10 11-20-49.png

Like digiajay likes this
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2022

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)  

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2022

Nope. Just tried to assign "Administrator" to "*" pattern. And this is still overriding the permission settings for other patterns.

Screenshot from 2022-03-14 12-16-09.png

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2022

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) 

Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2022

@Ben This worked. Thanks a lot. I created a non-admin group and assigned that with write permission on prefixed patterns. And this worked.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events