You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello,
Could you please help me on this code?
This is a user macro which displays a table with all spaces and their administrators, whatever the current user's permission.
It does not work since upgrading from 7.13 to 7.19
Thanks a lot for your help!
<table class="confluenceTable">
<tr>
<th class="confluenceTh">Spaces</th>
<th class="confluenceTh">Admins</th>
</tr>
#foreach ( $space in $spaces )
#if((!($space.isArchived())) && ($space.isGlobal()))
<tr>
#set($result=$space.getDescription().getDescriptionTitle())
<td class="confluenceTd"><a href="$req.contextPath$space.getUrlPath()">$space.getName()</a></td>
<td class="confluenceTd">
#foreach ($permission in $space.getPermissions())
#if ($permission.isUserPermission() && $permission.getType() == "SETSPACEPERMISSIONS")
#usernameLink($permission.getUserName())<br>
#end
#end
</td>
</tr>
#end
#end
</table>
This error message is displayed when editing the user macro:
User Macro display-all-spaces may use context keys [ spaceManager, req ] which are not set in system property macro.required.velocity.context.keys. If the macro is not rendered as expected, try to manually add those keys into the system property.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.