makandra/aegis — Issue #12: always check a method for a given role
Author: crankharder
Created: 2012-01-18 16:37:38+00:00
State: open

I want to check a list of whitelisted IP addresses whenever my admin role is accessed. So, instead of doing something like:

action :access_admin pages do
allow :admin do
user.matches_list_of_ips?
end
end

simply do this:

action :access_admin pages do
allow :admin
end

I haven't been able to find a good place to hook into aegis to do this. Ideas?