Method: CanTango::Configuration::Permits#allowed

Defined in:
lib/cantango/configuration/permits.rb

#allowed(candidate, actions, subjects, *extra_args) ⇒ Object



87
88
89
90
91
92
# File 'lib/cantango/configuration/permits.rb', line 87

def allowed candidate, actions, subjects, *extra_args
  executed_for(candidate).inject([]) do |result, permit|
    result << permit.class if permit.can? actions, subjects, *extra_args
    result
  end
end