It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I display a list of all Confluence spaces, disobeying permissions?

Andrew Snyder Jan 03, 2017

This question is in reference to Atlassian Documentation: Spaces List Macro

Does anyone out there know how I can generate a list of all spaces in our Confluence instance that ignores the permissions of the currently logged-in user?

The existing Spaces List macro obeys permissions, and only displays a list of spaces that a user has access to see.  This is a solid implementation from a security perspective.  However, I am interested in generating a list of all Confluence spaces, regardless of whether the logged-in user has access to see that space.  This may be undesirable for many other Confluence instances out in the world since acknowledging the existence of a space to users that don't have access to it is bad from a security perspective.  However, the Confluence administrators at my company have decided that allowing all users to see a list of spaces that they may or may not have access to is desired.  Otherwise, users may create duplicate content by accident when the content already existed in some other location that they should have gotten access to.

 

2 answers

1 accepted

0 votes
Answer accepted
Andrew Snyder Jan 03, 2017

I found the answer to my question over in another thread - https://answers.atlassian.com/questions/43122 - specifically in the 2nd comment from Aaron J. Schmidt.  It provides the code to generate a macro that shows a 4-column table.  The columns are:

  1. Space - the name of the space.  Clicking on the name brings you to the space.
  2. Key - the space key.  Clicking on the key brings you to the space.
  3. Users - the list of admins that have admin permissions via the "users" permission
  4. Groups - the list of admins that have admin permissions via the "groups" permission

It includes spaces that the logged-in user doesn't have access to.  When the user clicks on a link to a space that they don't have access to, they receive a warning saying that they don't have access to it.  This is exactly what I was looking for!

 

0 votes
Nic Brough [Adaptavist] Community Leader Jan 03, 2017

If you're worried about users creating duplicate content, then the obvious answer is that you should un-hide the stuff they're duplicating.

I don't think there's any sense or value in telling people "hey, there's a space over there for that... but we're not going to let you see it".

But, if you must do this, you're going to need to do some coding - you'll need to construct a version of the macro that runs the "list spaces" as though it's an admin.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,153 views 7 18
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