Hi all,
I am wondering if there is a way (plugin/s, macro/s, .. ) that could help quickly identyfy all Space Administrators in Confluence instance..
I am aware that this could be done using some scripts, but I am looking more for a OOTB or easy solution that will give me a list on a Confluence page. (Information about administrators as a result need to be available for all users to quickly identify who is responsible for a specific space without asking global Confluence Admins) ..
Any ideas?
Thanks,
Mirek
Hi all,
I was able to create a simple user macro that resolve my problem. It is listing all non personal spaces that could be expanded to view current space administrators (excluding confluence administrators). It is working fine on smaller instances.. not sure how long it will render on larger one..
Maybe someone will want to use it also on his own instance, so I am pasting the source code. If you have any comments or suggestions/improvements add a comment or please let me know direcly
## Macro title: Space Administrators ## Macro has a body: N ## Body processing: Selected body processing option ## Output: Selected output option ## ## Developed by: Mirek ## Date created: 06/12/2012 ## Installed by: Mirek ## Macro to display a list of user that are able to administer the current space. ## @noparams #set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager')) #set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null)) #set($containerManager = $getInstanceMethod.invoke(null,null)) #set($containerContext = $containerManager.containerContext) ##set($users = $userAccessor.getUsers()) #set($pageManager=$containerContext.getComponent('pageManager')) #set($spaceManager=$containerContext.getComponent('spaceManager')) #set($spaceList=$spaceManager.getAllSpaces()) <h2>List of all space administrators</h2> #foreach($s in $spaceList) #if( $s.isPersonal() ) #else <ac:macro ac:name="expand"> <ac:default-parameter>$s.getName()</ac:default-parameter> <ac:rich-text-body> <br /> <table> <tr> <th>Space Administrators $s.getKey()</th> </tr> #foreach($u in $spaceManager.getSpaceAdmins($s)) <tr> <td>#usernameLink($u.name)</td> </tr> #end </table> <br /> </ac:rich-text-body> </ac:macro> #end #end </ul>
Best Regards,
Mirek
I found only information about the macros https://answers.atlassian.com/questions/43122/know-space-administrators & http://blog.networkedcollaboration.com/2012/03/22/confluence-list-space-administrators-user-macro/
Hope one of the solution will help.
Cheers,
Szymon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Szymon,
Thank you!
I have quickly tested those solutions but is not yet ideally what I am looking for.. Both solutions give ability to show administrators but in different ways. First is showing individual users and groups.. Second one all administrators that have this permission (including Confluence Space administrators) ..The problem is that I need to add this macro on a specific space to see who is an administrator. If a user want to contact admin because for example he do not have permissions to view the space then this information is useless for him.
Ideally I want to have a macro that will show on different space a list of all spaces including list of administrators that are not Confluence Admins.
Regards,
Mirek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is my macro to return all non-personal spaces as well as their administrators. It is optimized as much as i can at this time so that it doesn't take over my confluence instance like the solution provided at https://confluence.atlassian.com/display/CONFKB/How+Do+I+View+a+List+of+All+Space+Administrators+for+All+Spaces
This is a much more streamlined approach:
## Macro title: Space Administrators
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Modified by: Adam Barylak
## Date created: 21/03/2012
## Date modified: 7/23/2017
## Installed by: <your name>
## Macro to display a list of space administrators
## @noparams
#set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null))
#set($containerManager = $getInstanceMethod.invoke(null,null))
#set($containerContext = $containerManager.containerContext)
#set($spaces = $spaceManager.getAllSpaces())
<table class="aui aui-table-interactive">
<tr>
<th class="confluenceTh">Space</th><th class="confluenceTh">Administrator(s)</th>
</tr>
#foreach($spacer in $spaces)
#if (!$spacer.isPersonal())
<tr>
<td class="confluenceTd"><a href="$req.contextPath/display/$spacer.key">$spacer.name</a></td><td class="confluenceTd"><ul>
#set($administrators = $spaceManager.getSpaceAdmins($spacer))
#foreach($admin in $administrators)
<li>#usernameLink($admin.name)</li>
#end
</ul>
</td>
</tr>
#end
#end
</table>
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.