chessmonster | 24 Jul 2012 02:07
Picon

[groovy-dev] could not initialize proxy - no Session, accessing the session object in the filters

i'm a bit new on the groovy grails technology and i'm having a problem with
this one

i looked at this could not initialize proxy - no Session but the application
don't get stale too long

I am trying to access the session object on my SecurityFilter placed on the
config subfolder. I just wanted to do a check for every request on the
controllers to verify if a user has the rights to do such actions.

class SecurityFilters {
    def filters = {

    userFilterList(controller:"user", action:"list") {
        before = {
            if (!session.user.accountType.equals("Admin")) {
                redirect(uri: "/")
            }
        }
    }
    userFilterShow(controller:"user", action:"show") {
        before = {
            if (!session.user.accountType.equals("Admin")) {
                redirect(uri: "/")
            }
        }
    }
    userFilterEdit(controller:"user", action:"edit") {
        before = {
            if (!session.user.accountType.equals("Admin")) {
(Continue reading)

chessmonster | 24 Jul 2012 06:24
Picon

[groovy-dev] Re: could not initialize proxy - no Session, accessing the session object in the filters

I just did the per controller class interceptor. it did the job but not as
elegant as with the use of filters :D

--
View this message in context: http://groovy.329449.n5.nabble.com/could-not-initialize-proxy-no-Session-accessing-the-session-object-in-the-filters-tp5710767p5710772.html
Sent from the groovy - dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane