Getting User Information in a Velocity Template

It is sometimes usefull to conditionally display formatting, debug information, or content when previewing Percussion templates.  Percussion user information is only available during Preview or Edit contexts as the current user when publishing is running will always be the systems internal rxserver user. 

Return the Current User



Get the Roles for the Current User



<h2>User Name: $rx.asmhelper.getUserName()</h2>


#foreach($role in $rx.asmhelper.getUserRoles())


#if($role == "Admin")

Place some Admin specific code / content here.