Wednesday, May 8, 2013

GrailsShiroPlugin forces anonymous user to log in

The boring redirection to /auth/login by GrailsShiroPlugin when the security checking blocks the requests sent by anonymous users.

A walk around:

1) change login action to logon (login.gsp to logon.gsp), and modify all the places where call login to call logon instead.
2) craete a new action login.

        def login = {
flash.message = "You need to login first to do this request."
redirect controller: "home"

No comments:

Post a Comment