Replies: 1 comment
-
Hey, thank you for caring about documentation! Really appreciate this. The explanation follows the example. Cask doesn’t assume that condition may be met. It comes from the understanding what question user asks. There are 2 types of questions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Restricting fields access
ability.can('update', ownArticle, 'title'); // true ability.can('update', anotherArticle, 'title'); // false ability.can('update', 'Article', 'title'); // true!
It is recommended to add a sentence in the document description to explain why the last one is true: When the passed subject is a entity name(string), the condition check will be skipped.
Without a concrete entity, CASL cannot determine whether the condition is met, so it assumes that the condition may be met.
Beta Was this translation helpful? Give feedback.
All reactions