Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Define abilities with "cannot" #7

Closed
ryanb opened this Issue · 1 comment

1 participant

@ryanb
Owner

Sometimes it would be convenient to use a "cannot" expression for defining abilities. For example.

can :read, :all
cannot :read, [Order, Account]

The question is, should I allow blocks to be passed to this variation? At first I thought it would be confusing but I can think of some use cases now.

cannot :read, Product do |product|
  product.invisible?
end
@ryanb
Owner

adding cannot method to define which abilities cannot be done - closed by d4405e6

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.