The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Shawn Doyle - ReleaseTEAM
Community Champion
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

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events