Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,667
Community Members
 
Community Events
165
Community Groups

best way for add-on to update content restrictions

I have an add-on (ACE, 3.2.0) which occasionally needs to update content restrictions to restrict page edits to certain users.

I can `PUT /wiki/rest/api/content/{id}/restriction` without issue, but get this issue if the restriction excludes the add-on user:

Provided ContentRestrictions evicts current user (you) from: [update]. Must include yourself in "user" sections for READ and/or UPDATE when restricting those operations. Must not provide restrictions which when applied result in current situation.

In the past, to get around this, I would simply make sure that I included the add-on user in all content restriction API calls. I would get the add-on user key by `GET /rest/api/user?username={addon_username}`.

However, I understand that passing `username` as a parameter is deprecated and will be removed as part of the GDPR update. So is there a better solution that I should be using to have my add-on update content restrictions? Or is there a way for my add-on to look up its own `accountId`? (`GET /rest/api/user/current` does not work in this context)

I do want to ensure that the add-on does not evict itself from the update, as this would break other add-on functionality.

2 answers

Any progress here?  I have the same issue and need to update a few hundred pages.

Hi Jason, can you solve this ?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

219 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you