-
-
Notifications
You must be signed in to change notification settings - Fork 276
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 generic types to Ability and related types [skip ci]
deprecates `actions` field in `Rule` types use `action` instead deprecates `AbilityBuilder.define` use `AbilityBuilder.extract` instead removes default `crud` alias. If you want it use `Ability.addAlias('crud', ['create', 'read', 'update', 'delete'])` removes possibility to pass `RuleType` option in `Ability` constructor. Use `conditionsMatcher` and `fieldMatcher` options instead. `packRules` and `unpackRules` now accepts optional second argument which packs/unpacks subject type. This is useful when you want to use Classes as subject types Fixes #256 BREAKING CHANGES
- Loading branch information
Showing
16 changed files
with
470 additions
and
387 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
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
Oops, something went wrong.