def filters = {
forUser(controller:'user', action:'*') {
before = {
user=springSecurityService.getCurrentUser()
log.info("came to filter and the user is" + user)
}
after = {
}
afterView = {
}
}
}
I want to access this user variable in the user controller.
Is it possible without making a session variable?
You can use request-scope variable:
and use it in GSP as:
or in controller: