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

1 vote

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
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

158 views 3 5
Join discussion

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