Hi All,
I tried below macro code using below link but it is showing blank
## Developed by: Author
## Date created: 20/08/2024
##@param User:title=User|type=string|required=true|desc=Enter a user name.
<ul>
#foreach($group in $userAccessor.getGroupNamesForUserName($paramUser))
<li>$group</li>
#end
</ul>
Hi @Balvant Biradar ,
we've been using the same macro for a long time. Please make sure that you
Cheers,
Nicolai
It is fixed by just adding below flag in setenv.sh file
CATALINA_OPTS="-Dmacro.required.velocity.context.keys=userAccessor ${CATALINA_OPTS}"
Macro will return groups for passed username
Working enhanced code
-------------------------------------------------------------------------
## Developed by: Balvant
## Date created: 20/08/2024
## It is not supported in versions released after 7.19+ versions
## To work you can add CATALINA_OPTS="-Dmacro.required.velocity.context.keys=userAccessor ${CATALINA_OPTS}" in setenv.sh
## @Param User:title=User|type=string|required=true|desc=Enter a user name.
<ol>
<b>User $paramUser is part of below groups if user is active</b>
#foreach($group in $userAccessor.getGroupNamesForUserName($paramUser))
<li>$group</li>
#end
</ol>
----------------------------------------------------------------------------------------------
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.