How to disable anonymous access to all personal spaces in one time

We have enabled anonymous access on site level to allow anonymous user to access to a public space which is anonymous access enabled. Then we find many people post contents, such as blog, on their personal space which is anonymous access enabled. But we don't want the anonymous users to access such contents on people's personal spaces. So is there any way to disable anonymous access to all the personal spaces in one time?

2 answers

This widget could not be displayed.

Hi there,

Highly recommend you to create a database backup dump and execute the given SQL query below on your staging environment as a safety precaution

DELETE FROM spacepermissions WHERE spaceid IN (SELECT spaceid FROM SPACES WHERE SPACETYPE ='personal') AND PERMGROUPNAME IS NULL AND PERMUSERNAME IS NULL;

The above query will delete every anonymous permission on every personal spaces. Hope it helps.

Cheers,

Septa Cahyadiputra

This widget could not be displayed.

Use the Confluence Command Line Interface with the runFromSql action with SQL to select all personal spaces for the removePermissions action - something like:

confluence --action runFromSql --sql "select spacekey as "space" from spaces where spacetype = 'personal'" --common "-a addPermissions --permissions view --userId anonymous" --database confluence-3.5.13 --driver postgresql

This is a legal Confluence activity, no need to shutdown Confluence or worry about database backup. Use the latest snapshot - confluence-cli-2.6.0-SNAPSHOT-distribution.zip

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 11 hours ago in Canada

AUG Lunch Roundtable - August 13 - Highlights

Thanks to everyone who came out today for the lunch AUG - we had some great food and discussion (and ice cream sandwiches to fend off the heat!) The welcome and fun fact was great as well, what an aw...

27 views 1 3
View post

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