Using the Acegi AuthenticateService
Copy this code and paste it in your HTML
def userPrincipal
= authenticateService.
principal() println userPrincipal.
getUsername() //shows the current logged user username println userPrincipal.
getAuthorities() //shows the current logged user authorities redirect action: list, params: params
}
Report this snippet