Skip to content

Commit 03fd007

Browse files
authored
add remove_space_permission (#1291)
1 parent 9822cf3 commit 03fd007

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

atlassian/confluence.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3008,6 +3008,24 @@ def add_space_permissions(
30083008

30093009
return self.post(url, data=data, headers=self.experimental_headers)
30103010

3011+
def remove_space_permission(self, space_key, user, permission):
3012+
"""
3013+
The JSON-RPC APIs for Confluence are provided here to help you browse and discover APIs you have access to.
3014+
JSON-RPC APIs operate differently than REST APIs.
3015+
To learn more about how to use these APIs,
3016+
please refer to the Confluence JSON-RPC documentation on Atlassian Developers.
3017+
"""
3018+
if self.api_version == "cloud":
3019+
return {}
3020+
url = "rpc/json-rpc/confluenceservice-v2"
3021+
data = {
3022+
"jsonrpc": "2.0",
3023+
"method": "removePermissionFromSpace",
3024+
"id": 9,
3025+
"params": [permission, user, space_key],
3026+
}
3027+
return self.post(url, data=data).get("result") or {}
3028+
30113029
def get_space_permissions(self, space_key):
30123030
"""
30133031
The JSON-RPC APIs for Confluence are provided here to help you browse and discover APIs you have access to.

0 commit comments

Comments
 (0)