Generate Confluence spaces with users

Hi,

I need to generate a report/list of all sites in our confluence where we have 3 colums:

 - Space name/link 

 - Key

 - All userid which have access to this space

What is the easiest way to genereate it automatiacally 

2 answers

This user macro should do exactly what you asked for:

## @noparams
<table>
<tr>
<th>Space</th>
<th>Key</th>
<th>Users with access</th>
</tr>
#set ( $allUsers = $userAccessor.getUsers() )
#foreach ( $spaceObject in $spaceManager.getAllSpaces() )
#if ( $spaceObject.isGlobal() )
<tr>
<td><a href="$spaceObject.deepLinkUri">$spaceObject.name</a></td>
<td><p>$spaceObject.key</p></td>
<td>
#foreach ( $user in $allUsers )
#if ( !$user.isDeactivated() && $permissionHelper.canView($user, $spaceObject) )
<p> $user.name </p>
#end
#end
</td></tr>
#end
#end
</table>

 Note that it might take a long time if you have a lot of users/spaces.

Thank you Stephen

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

309 views 2 13
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