Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding "Read only" permissions in Bitbucket

Satish LVR August 16, 2018

Hi,

we have created “Repository Permissions” for few people with Only read permissions in Bitbucket. As per Bitbucket rules, the members who has only “read” permissions, cannot merge a pull request, but in our case, the member who has only “read” is able to merge the code. This sounds little strange but this is what happening.

I am not able to find what is root cause for this. Can anybody throw some light on this where should be possible problem ?

Our requirement is mainly to control merge feature. We would like to have only few members have merge permission where all developers can create branches and pull requests.

I already checked "Merge check" option. It gives me options to have pass criteria but not with limiting members.

Please let me know if there are other ways to fulfill my requirement.

 

Thanks !

1 answer

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2018

Hello,

Have a look at the Branch permissions in the repository settings. Maybe this users are granted write access to some of the branches.

Satish LVR August 16, 2018

Thank you for your reply Alexey. Following are the options I am getting when I select Branch permissions.

Branch_permissions.PNGIn this, how to control for members to have permissions for creating branch, commit the changes, create pull request but not merge the request ? For merge, we would like to control the permissions to very few.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2018

Your permissions look ok. Actually if a user has only read-only permissions, this user can not make changes to the code. I just thought maybe there is a bug or something. But it looks ok in your settings.

By the way, what do you mean by merge request? As far as I know there are only pull requests.

Satish LVR August 16, 2018

I mean "merge" the change to branch.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2018

You mean the push command?

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2018

By the way, could it be that this users are in some group, which have the wirte permission in your bitbucket?

Satish LVR August 16, 2018

Merge_button.PNG

Hi Alexey, I mean the option in above pic which would come when we create a pull request for a change.

Now I got some clarity with further experiments. I was thinking to control merge permission to developer branch also which is not required generally. I can control pull request from a developer branch to release branch which is my main requirement.

I gave write permissions to users. Users can create, review, merge to developer branches. But I can control merging those changes to release branch with branch permissions.

Please let me know if this is fine or any other improvements can be done.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2018

Yes, usually it is done like this. Users have write permissions for your repository. In this case they can create branches and change them. But you have a couple of branches (master, develop), to which most users do not have the write permission. These users create only pull requests to these branches and then users, who have the write permission on these branches (repository settings -> branch permissions) can already merge these pull request. I guess, right now your setups are like this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events