·
1199 commits
to master
since this release
@casl/angular-v2.0.0 (2019-02-10)
Bug Fixes
Features
BREAKING CHANGES
- ability:
manageis not anymore an alias for CRUD but represents any action.
Let's consider the next example:
const ability = AbilityBuilder.define((can) => {
can('manage', 'Post')
can('read', 'User')
})In @casl/[email protected] the definition above produces the next results:
ability.can('read', 'Post') // true
ability.can('publish', 'Post') // false, because `manage` is an alias for CRUDIn @casl/[email protected] the results:
ability.can('read', 'Post') // true
ability.can('publish', 'Post') // true, because `manage` represents any actionTo migrate the code, just replace manage with crud and everything will work as previously.