NUBIC / aker

A flexible security framework for Rack (and Rails) apps. Good for integration with legacy systems, CAS SSO (including proxying), machine and interactive authentication, and much more.
MIT License
1 stars 2 forks source link

Support affiliate_ids in Aker::User#permit? #11

Closed rsutphin closed 13 years ago

rsutphin commented 13 years ago

Allow User#permit? to be used in applications that use affiliate-constrained groups by supporting an :affiliate_ids option for permit?. Ex:

env['aker.check'].user.permit?(:Admin, :affiliate_ids => [3, 18]) do
  puts "You are an admin from one of the good affiliates. Good for you."
end