]> git.openstreetmap.org Git - rails.git/commitdiff
separate ability and capability
authorChris Flipse <cflipse@gmail.com>
Sun, 17 Jun 2018 17:15:49 +0000 (13:15 -0400)
committerChris Flipse <cflipse@gmail.com>
Sun, 17 Jun 2018 17:57:32 +0000 (13:57 -0400)
These are asking fundamentally different questions;

Abilities are asking the application if the user has a role that allows
the user to take a certain action
Capabilities are asking if the user has granted the application to
perform a certain type of action

CanCanCan makes no distinction, however, so the `granted_capabilities`
method is provided as a point that can be checked in rescue methods, so
that one can _attempt_ to continue to provide the more informative error
messages around permission refusals


No differences found