Remove restrictions all pages

Hello,

Someone one my team must have set a page restriction or something applied restrictions to all pages (we use scroll versions).  I need to get restrictions removed from all pages as we only use global permissions on the space.  Is there a way to easily do this without having to edit every single page?

Thank you

2 answers

1 accepted

Hey Neal,

 One Idea is to remove the entries from the database:

  1. Shutdown Confluence.
  2. Backup your database.
  3. Run below query to 

    Select SPACEID from SPACES
     WHERE SPACENAME = 'My Space Name';
  4. The spaceid from my local test is '851969', once you get the id from above query, replace the number 851969 in below queries and run then sequentially:

  5. delete from CONTENT_PERM
    WHERE CPS_ID IN (select ID from CONTENT_PERM_SET
    WHERE CONTENT_ID IN (select CONTENTID from CONTENT
    WHERE SPACEID = 851969
    AND CONTENTTYPE = 'PAGE'));
  6. delete from CONTENT_PERM_SET
    WHERE CONTENT_ID IN (select CONTENTID from CONTENT
    WHERE SPACEID = 851969
    AND CONTENTTYPE = 'PAGE');
  7. Start Confluence.

  8. Check if the pages still have restrictions.
As a side note I've also created a KB smile:
Thanks and Regards,
David| The Engineer that like Windows for realsies.

 

You can use the removePermissions action from Confluence Command Line Interface (CLI). You need to know the specific user or group that has the permission. To do this for all pages in a space do something like:

confluence --action runFromPageList --space myspacekey --common "--action removePermissions --id @pageId@ --group mygroup --permissions view,edit"

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 8 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

85 views 2 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you