How do I give remove page permissions to all users from a group for all spaces?

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2012

I have 40-50 Spaces and for historical reasons, people do not have remove page rights on them.

How can I fix this, without doing too much manual work?

And, how can I change the permissions so the users will have the desired rights by deault?

1 answer

2 votes
Azwandi Mohd Aris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

You can make use of the Confluence Command Line interface: https://plugins.atlassian.com/plugins/org.swift.confluence.cli. It is a remote API client - use it in a loop to apply the permission for your groups/users.

The method you will need to use is addPermissions, with permission removepage. See this for the doc:

https://bobswift.atlassian.net/wiki/display/CSOAP/Documentation#Documentation-addPermissions

I'm afraid there is no way to change the default space permission settings for new spaces.

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

Adding to Azwandi's answer, if you have CLI 2.6.0, it is easy to do for all spaces using something like:

confluence --action runFromSpaceList --common "--action addPermissions --space @space@ --permissions REMOVEPAGE --userId xxxxx"

or for groups, use --group instead of --userid

You can also look at your permissions via getSpacePermissionList - the documentation will be available when 2.6.0 is released (snapshot only right now).

Amber Batson July 10, 2013

When doing runFromSpaceList, is there a way to loop through the groups & users for each space? I'm trying to make our old wiki read-only for content reference for an upgrade but have 2000+ spaces with all different users..

Amber Batson July 10, 2013

I think I can do getSpacePermissionList to text file, then use a script to loop through that and remove the permissions.. sorry - long day and I'm a little new to this :-) I'm going to try it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events