Skip to content

add remove_space_permission #1291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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