Skip to content

Commit

Permalink
add remove_space_permission (#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
m42e committed Jan 12, 2024
1 parent 9822cf3 commit 03fd007
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -3008,6 +3008,24 @@ def add_space_permissions(

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

def remove_space_permission(self, space_key, user, permission):
"""
The JSON-RPC APIs for Confluence are provided here to help you browse and discover APIs you have access to.
JSON-RPC APIs operate differently than REST APIs.
To learn more about how to use these APIs,
please refer to the Confluence JSON-RPC documentation on Atlassian Developers.
"""
if self.api_version == "cloud":
return {}
url = "rpc/json-rpc/confluenceservice-v2"
data = {
"jsonrpc": "2.0",
"method": "removePermissionFromSpace",
"id": 9,
"params": [permission, user, space_key],
}
return self.post(url, data=data).get("result") or {}

def get_space_permissions(self, space_key):
"""
The JSON-RPC APIs for Confluence are provided here to help you browse and discover APIs you have access to.
Expand Down

0 comments on commit 03fd007

Please sign in to comment.