From 5cfd54206ca3b7e3bb019d04a2045b40a6fcb39f Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Mon, 22 Feb 2021 13:31:01 -0500 Subject: [PATCH] Confirm that `:manage` and `:all` also apply to `cannot` --- docs/cannot.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/cannot.md b/docs/cannot.md index 5d1fc4d6..ba6b968d 100644 --- a/docs/cannot.md +++ b/docs/cannot.md @@ -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 +```