Skip to content

Commit

Permalink
Confirm that :manage and :all also apply to cannot
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbeck committed Jul 8, 2022
1 parent 3e9e438 commit 5cfd542
Showing 1 changed file with 8 additions and 0 deletions.
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
```

0 comments on commit 5cfd542

Please sign in to comment.