-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ability): adds support for
manage
action
This action is an alias to any action, the prev `manage` is renamed to `crud`. Also fixed priority order for `all` subject name. Closes #119 BREAKING CHANGE: `manage` is not anymore an alias for CRUD but represents any action. Let's consider the next example: ```js const ability = AbilityBuilder.define((can) => { can('manage', 'Post') can('read', 'User') }) ``` In @casl/[email protected] the definition above produces the next results: ```js ability.can('read', 'Post') // true ability.can('publish', 'Post') // false, because `manage` is an alias for CRUD ``` In @casl/[email protected] the results: ```js ability.can('read', 'Post') // true ability.can('publish', 'Post') // true, because `manage` represents any action ``` To migrate the code, just replace `manage` with `crud` and everything will work as previously.
- Loading branch information
Showing
6 changed files
with
109 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
language: node_js | ||
node_js: | ||
- 6 # to be removed 2019-04-01 | ||
- 8 # 2019-12-01 | ||
- lts/* | ||
- node | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.