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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
After we upgraded to version 7.19.7 the result of a user macro has changed, namely it now shows the user name instead of the full name.
The macro code is the following:
## Macro title: Space Administrators
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Date created: 21/03/2012
## Installed by: <your name>
## 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($loginManager = $containerContext.getComponent('loginManager'))
#set($users = $userAccessor.getUsers())
<table class="confluenceTable">
<tr>
<th class="confluenceTh">Beheerders</th>
</tr>
#foreach ($permission in $space.getPermissions())
#if ($permission.isUserPermission() && $permission.getType() == "SETSPACEPERMISSIONS")
<tr>
<td class="confluenceTd">#usernameLink($permission.getUserName())</td>
</tr>
#end
#end
</table>
Where before the upgrade it would display 'Patrick Vanhoof' as a result of the macro, it now shows 'PVanhoof'.
Why?
Hey @Patrick Vanhoof ,
try to substitute the following row:
...
<td class="confluenceTd">#usernameLink($permission.getUserName())</td>
...
with :
...
<td class="confluenceTd">#usernameLink($permission.getUserSubject()
.getFullName() )</td>
...
Hope this helps,
Fabio
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you're welcome @Patrick Vanhoof ;)
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.