Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm that :manage and :all also apply to cannot #694

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/cannot.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ cannot :destroy, Project
will allow the user to do **any** action but destroy the project.

Of course, there's a `cannot?` method to check abilities that is a simple alias for `!can?`.

## Remove all permissions

`cannot` supports the special subject `:all`.

```ruby
cannot :manage, :all # user cannot perform any action on any object
```