The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Permission Restriction API call - seeing duplicate entry of the permission restriction.

Uma Shankar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 14, 2019

Once i do a post the below call for creating the permission restriction - it is not updating already existing branch permission . I removed the existing branch and fired the below and i see the restriction is created but which is not working as it is allowing merge to happen for all the user even after i restrict to a particular user . 

I tried to remove all the users manually & raised a PR and found the merge button is enabled for all the users . 

-----------------------------------------------------------------------------------------

curl -i -u ***:*** -H "Accept: application/json" -H "Content-Type: application/vnd.atl.bitbucket.bulk+json" -X POST -d @access.json https://bitbucket.global.standardchartered.com/rest/branch-permissions/2.0/projects/****/repos/******/restrictions

 

[{
"id": 1,
"type": "read-only",
"matcher": {
"id": "release/19.6",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [***]
},
{
"id": 100,
"type": "fast-forward-only",
"matcher": {
"id": "release/19.6",
"displayId": "",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [],
"groups": []
},
{
"id": 200,
"type": "no-deletes",
"matcher": {
"id": "release/19.6",
"displayId": "",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [],
"groups": []
},
{
"id": 300,
"type": "pull-request-only",
"matcher": {
"id": "release/19.6",
"displayId": "",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [****],
"groups": []
}
]

--------------------------------------------------------------------------------------------

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events