**
**
我在这里引用此API。 DELETE调用遵循以下模式:
/rest/branch-permissions/2.0/projects/{projectKey}/repos/{repositorySlug}/restrictions/{id}
我的问题是我是否可以使用此调用来修改该限制ID中的用户。例如,如果您有一个主分支,并且您想要修改更改的分支权限而没有拉取请求,并且说您当前有两个用户(id:1和id:2)。我是否可以使用此REST调用从此特定限制ID中删除ID为2的用户?
这是一个示例GET输出,可能更容易看到我的意思。在下面的示例json输出中,我想从限制ID 102下删除id为2的用户。
{
"size": 2,
"limit": 25,
"isLastPage": true,
"values": [
{
"id": 100,
"type": "fast-forward-only",
"matcher": {
"id": "refs/heads/master",
"displayId": "master",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [],
"groups": []
},
{
"id": 101,
"type": "no-deletes",
"matcher": {
"id": "refs/heads/master",
"displayId": "master",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [],
"groups": []
},
{
"id": 102,
"type": "pull-request-only",
"matcher": {
"id": "refs/heads/master",
"displayId": "master",
"type": {
"id": "BRANCH",
"name": "Branch"
},
"active": true
},
"users": [
{
"name": "user1",
"emailAddress": "...",
"id": 1,
"displayName": "...",
"active": true,
"slug": "user1",
"type": "NORMAL",
"links": {
"self": [
{
"href": "..."
}
]
}
},
{
"name": "user2",
"emailAddress": "...",
"id": 2,
"displayName": "...",
"active": true,
"slug": "...",
"type": "NORMAL",
"links": {
"self": [
{
"href": "..."
}
]
}
},
],
"groups": []
}
],
"start": 0
}