search for: req_perm

Displaying 1 result from an estimated 1 matches for "req_perm".

Did you mean: reg_perm
2008 Mar 01
15
before_filter strange behaviour on update and create
Hi, I wrote a authentication script and I''m calling it like this in every class: class Blah < ApplicationController before_filter :auth def auth req_perm = Permission.find_by_name("Permission Blah") access = AccessController.new() if access.is_logged_in(session.session_id) if !access.get_current_user(session.session_id).role.permissions.include? req_perm redirect_to no_permission_url end else redirect_to login_url end end It wo...