Thorsten Blum
2007-07-13 14:59:57 UTC
Hi all,
after upgrading from grails-0.5 to grails-0.5.6 we're having problems
with our controllers using the "beforeInterceptor" and not having the
"index = {}" closure.
The following controller works fine, but if you uncomment "def index =
{}" the beforeInterceptor is not executed anymore and you get: "Not
Found RequestURI=/project/image".
Is this how it should behave? We would need "def index = {}" in every
controller using a beforeInterceptor although it's empty? Is this
correct?
class UserController extends AuthorizedAccessController {
def index = {}
def login = {...}
def logout = {....}
}
abstract class AuthorizedAccessController {
def beforeInterceptor = [ action: this.&auth, except: [ 'login' ] ]
private auth() {
if( !session.user ) {
redirect( controller: 'home' )
}
}
}
Any help would be very much appreciated!
Cheers
-Thorsten
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
after upgrading from grails-0.5 to grails-0.5.6 we're having problems
with our controllers using the "beforeInterceptor" and not having the
"index = {}" closure.
The following controller works fine, but if you uncomment "def index =
{}" the beforeInterceptor is not executed anymore and you get: "Not
Found RequestURI=/project/image".
Is this how it should behave? We would need "def index = {}" in every
controller using a beforeInterceptor although it's empty? Is this
correct?
class UserController extends AuthorizedAccessController {
def index = {}
def login = {...}
def logout = {....}
}
abstract class AuthorizedAccessController {
def beforeInterceptor = [ action: this.&auth, except: [ 'login' ] ]
private auth() {
if( !session.user ) {
redirect( controller: 'home' )
}
}
}
Any help would be very much appreciated!
Cheers
-Thorsten
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email