So you are basically saying if the user has show access then they have update 
access as well?

Are you redirecting upon clicking update of the form or upon clicking the 
update link?
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Chris Drappier <[email protected]>
Date: Wed, 2 Dec 2009 12:21:50 
To: <[email protected]>
Subject: redirect on authorization failure

Hi All,

I've been trying to set activescaffold up to properly redirect when there's
an authorization failure in AS's security layer, so, In my controller, i've
rewritten update_authorized_filter like this :

def update_authorized_filter
        link = active_scaffold_config.show.link ||
active_scaffold_config.show.class.link
        if self.send(link.security_method)
            flash[:error] = "You Are Not Authorized To Update this record"
            redirect_to :action => :index
        end
  end

it redirects fine, but I lose the flash message.  Any Idea why this might be
the case?


thx for your help :)

-C

--

You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.



--

You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.


Reply via email to