Is there a way to check for attachment delete permissions via API or context conditions?

Igor Hercer
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!
August 1, 2024

 

Is there a way to check for attachment delete permissions via API or context conditions as a query? I've already checked this endpoint, not sure if it's working, though.

/wiki/api/v2/attachments/{id}/operations

are operations the same thing as permissions?

/wiki/rest/api/content/{id}/permission/check

I've also tried with this one, but it always returns true, and is related to page permissions rather than attachment permissions.

In query context condition I've tried 

condition.has_attachment_permission(permission=REMOVE)

this is  always false :(

1 answer

1 accepted

1 vote
Answer accepted
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 2, 2024

Hi @Igor Hercer 

Attachment permissions are set at the space level, but alas there doesn't seem to be a direct way to get them via the API.

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-spaces-id-permissions-get

You can check to see if you have permissions for a specific operation, read, delete, via the permission check. This is with the v1 API, there doesn't seem to be a v2.

https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions/#api-wiki-rest-api-content-id-permission-check-post

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events