24 Jul 2012 02:07
[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)
RSS Feed