Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow subclasses to match on superclass subject
if Bicycle < Vehicle, and you have a policy `can :read, Vehicle`, then already `can?(:read, Vehicle.new)` and `can?(:read, Bicycle.new)` are both true. `can?(:read, Vehicle)` is also true. I believe `can?(:read, Bicycle)` should also be true, it should respect the subclass. Bicycle is a kind of Vehicle, so if they have been granted permission to read all Vehicles, that applies to all Bicycles too. Closes chaps-io#55, see more there.
- Loading branch information