passing throw matching rules with not matching conditions
Main goal is to allow:
cannot :manage, :all
can :read, :all
can :manage, User, :id=>user.id
can :manage, User, :manager_id=>user.id
Signed-off-by:
Sokolov Yura <funny.falcon@gmail.com>
Showing
- lib/cancan/ability.rb 110 additions, 17 deletionslib/cancan/ability.rb
- lib/cancan/active_record_additions.rb 1 addition, 1 deletionlib/cancan/active_record_additions.rb
- lib/cancan/can_definition.rb 8 additions, 5 deletionslib/cancan/can_definition.rb
- spec/cancan/ability_spec.rb 66 additions, 7 deletionsspec/cancan/ability_spec.rb
- spec/cancan/can_definition_spec.rb 2 additions, 2 deletionsspec/cancan/can_definition_spec.rb
Loading
Please register or sign in to comment