Permalink
Browse files

bugfix: need to add a before filter to set the session[:access_rights]

  • Loading branch information...
1 parent 6ecf30d commit 009e1cee84714fd520af6675382ab736fcb986a6 @jasondew committed Feb 28, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/role_authorization/exts/controller.rb
View
2 lib/role_authorization/exts/controller.rb
@@ -27,6 +27,8 @@ def allow(&block)
def add_role_authorization_filter
callbacks = _process_action_callbacks
chain = callbacks.select {|cl| cl.klass.to_s.include?(name)}.collect(&:filter).select {|c| c.is_a?(Symbol)}
+
+ before_filter {|controller| add_role_authorization_session_values controller.current_user }
before_filter :check_request_authorization unless chain.include?(:check_request_authorization)
end

0 comments on commit 009e1ce

Please sign in to comment.