Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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 edited

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
atlassian, compass learning path, get the most out of compass, internal developer platform, devex learning path, atlassian learning, transparent architecture, component catalog, improve dev experience, compass platform training

Elevate your skills and enroll in the Compass learning path today! 💻

This learning path offers short, self-paced courses to help software teams systematically manage components and services. Compass provides a unified interface for tracking distributed software architecture and team collaboration.

Learn more!
AUG Leaders

Atlassian Community Events