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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.