Releases: stalniy/casl
Releases · stalniy/casl
@casl/[email protected]
@casl/react-v1.0.1 (2019-02-10)
Bug Fixes
@casl/[email protected]
@casl/mongoose-v2.3.1 (2019-02-10)
Bug Fixes
@casl/[email protected]
@casl/[email protected]
@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.
@casl/[email protected]
@casl/ability-v3.0.0 (2019-02-04)
Bug Fixes
- ability: prevent creation of
managealias (4ca1268), closes #119 - ability: updates ts definitions for
Ability(2c989b2), closes #119
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.
- ability: prioritise rules with
allsubject in the same way as other rules
Let's consider the next example:
const ability = AbilityBuilder.define((can) => {
can('read', 'User', { id: 1 })
cannot('read', 'all')
})According to rule ordering read all rule must override read User rule but in @casl/[email protected] there was a bug and this is not true:
ability.can('read', 'User') // trueIn @casl/[email protected] this works as expected
ability.can('read', 'User') // false@casl/[email protected]
@casl/react-v1.0.0 (2019-02-03)
@casl/[email protected]
@casl/mongoose-v2.3.0 (2018-12-28)
Features
@casl/[email protected]
@casl/angular-v1.0.0 (2018-12-02)
Bug Fixes
- angular: adds possibility to use angular module in lazy loaded routes (0c7c3c1)
BREAKING CHANGES
- angular: Fixes #131