I'm running Confluence DC 7.9.3 and I want to be able to see all of the page restrictions that have been created across the environment.
I know that I can go to each individual space and see the restricted pages there, but I don't want to have to go through all of the spaces we have and make notes for each space.
Whether it's part of the basic Confluence functionality or through a third-party plugin, is there a way that I can display, on a single page, a list of all of the restricted pages (and what spaces they are under)?
The only plugin I see close to that is this one. The functionality you're looking for doesn't exist in Confluence out of the box. This plugin will show you page restrictions broken down as they apply to various groups, but I'm not sure that's quite what you're looking for.
Thanks,
Kian
Thanks for the quick reply. We keep most of our users in just a couple of groups that give them access to Confluence, so the restrictions are added at the individual user level. This means that most of the restrictions wouldn't show up in the above plugin.
I'll mark your answer as accepted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I ended up creating something in scriptrunner that goes through all of the spaces and returns any pages that are restricted. I skip over the personal/archived spaces.
import com.atlassian.confluence.spaces.Space
import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.security.SpacePermission
import com.atlassian.confluence.pages.PageManager
import com.atlassian.confluence.pages.Page
PageManager pageMan = ComponentLocator.getComponent(PageManager)
SpaceManager spaceMan = ComponentLocator.getComponent(SpaceManager)
def spaces = spaceMan.getAllSpaces()
String allSpaces = ""
for (space in spaces)
{
if (space.isPersonal())
{
continue
}
if (space.isArchived())
{
continue
}
def permissions = pageMan.getPermissionPages(space) as List<Page>
for (permission in permissions)
{
if (!allSpaces.contains("${space.getName()}, "))
{
allSpaces = allSpaces + space.getName() + ", <br>"
}
}
}
return allSpaces
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Matt Parks: Thanks, below the line of code gives us the list of pages where restrictions are applied. Just that function name is a bit confusing, I think it should be getRestrictedPages(space) :)
def permissions = pageMan.getPermissionPages(space) as List<Page>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.