ok Confluence 5.5 User Macro „space-admins“ | CMS - Webdesign - Website

Confluence 5.5 User Macro „space-admins“

Dieses User Macro für Confluence listet alle Space Admins (User mit Space Admin Permisssion) eines definierten oder des aktuellen Space auf und bietet eine E-Mail-Möglichkeit (an einen einzelnen Space Admin oder an alle zusammen).

## Macro title: space-admins
## Macro has a body: N
## Developed by: Stefan Baader
## Date created: 29/07/2014
## Installed by: Stefan Baader
## Space Admins of a space (by space key)
## @param SpaceKey:title=Space Key|type=string|required=false|desc=Space Key to filter
#if($paramSpaceKey)
  #set($mySpace = $spaceManager.getSpace($paramSpaceKey) )
#else
  #set($mySpace = $space )
#end
  <p>
<strong>Space "$mySpace.getName()"</strong> (key: $mySpace.getKey())
</p> 
<p>Space Admin(s):</p> 
  #set( $mailSubject = "$req.getServerName() - Space $mySpace.getName() (key: $mySpace.getKey())" )
  #set($admingroup = $userAccessor.getGroup("confluence-administrators") )
  #set($spaceadmins = $spaceManager.getSpaceAdmins($!mySpace) )
  #foreach($spaceadmin in $spaceadmins)
       #if(!$userAccessor.hasMembership($admingroup,$spaceadmin) )
          <a href="mailto:$spaceadmin.getEmail()?subject=$mailSubject">$spaceadmin.getFullName()</a> &nbsp;
       #end
  #end
   [ <a href="mailto:
  #foreach($spaceadmin in $spaceadmins)
       #if(!$userAccessor.hasMembership($admingroup,$spaceadmin) )
          $spaceadmin.getEmail();
       #end
  #end
  ?subject=$mailSubject" style="font-size:smaller">Mail to all</a> ]
  </p>