Generate Confluence spaces with users

Piotr Dziedziel July 24, 2017

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
Stephen Deutsch
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.
July 24, 2017

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.

0 votes
Piotr Dziedziel July 27, 2017

Thank you Stephen

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events