Releases: stalniy/casl
Releases · stalniy/casl
@casl/[email protected]
@casl/angular-v2.0.0 (2019-02-10)
Bug Fixes
Features
BREAKING CHANGES
- ability:
manage
is 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 CRUD
In @casl/[email protected] the results:
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.
@casl/[email protected]
@casl/ability-v3.0.0 (2019-02-04)
Bug Fixes
- ability: prevent creation of
manage
alias (4ca1268), closes #119 - ability: updates ts definitions for
Ability
(2c989b2), closes #119
Features
BREAKING CHANGES
- ability:
manage
is 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 CRUD
In @casl/[email protected] the results:
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.
- ability: prioritise rules with
all
subject 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') // true
In @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
@casl/[email protected]
@casl/[email protected]
@casl/angular-v0.4.1 (2018-11-11)
Bug Fixes
@casl/[email protected]
@casl/angular-v0.4.0 (2018-11-11)
Bug Fixes
- angular: converts source to typescript (565936d), closes #126
- README: changes links to @casl/ability to point to npm package instead to git root [skip ci] (a74086b), closes #102
- semantic-release: test (cab3f4b), closes #94
Features
- react:can: updates typescript declarations (213dcde)