Using the Acegi AuthenticateService


/ Published in: Groovy
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def authenticateService
  2.  
  3. def debugPrincipal = {
  4. def userPrincipal = authenticateService.principal()
  5. println userPrincipal.getUsername() //shows the current logged user username
  6. println userPrincipal.getAuthorities() //shows the current logged user authorities
  7. redirect action: list, params: params
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.