Still playing with ACL9 authorization i find a strange behavior. If i
use in the controller somethign like :

  allow anonymous, :to => [:index, :show, :show_search]

  rescue_from 'Acl9::AccessDenied', :with => :access_denied

  def access_denied
      if current_user
        render :template => 'access_denied'
      else
        flash[:notice] = 'Access denied. Try to log in first.'
        redirect_to login_path
      end
    end

In a normal link (no-AS) it works well, but if try to click on "edit"
for example i can see in logs:

  Processing DevicesController#edit (for ::ffff:127.0.0.1 at
2009-06-26 13:01:42) [GET]
  Parameters: {"action"=>"edit", "_method"=>"get",
"adapter"=>"_list_inline_adapter", "id"=>"953125641",
"controller"=>"devices"}
Redirected to http://localhost:3000/login

But the view is not redirected, just nothign happen.Maybe the best
solution is to add a flash[:error] msg to AS so AS can show it like
other errors (red background line on top).
So the questin is how can i add messages to AS errors?

TIA
--~--~---------~--~----~------------~-------~--~----~
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