Skip to content

Releases: stalniy/casl

@casl/[email protected]

10 Feb 10:08
Compare
Choose a tag to compare

@casl/angular-v2.0.0 (2019-02-10)

Bug Fixes

Features

  • ability: adds support for manage action (d9ab56c), closes #119

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]

04 Feb 20:05
Compare
Choose a tag to compare

@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

  • ability: adds support for manage action (d9ab56c), closes #119

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]

03 Feb 07:55
Compare
Choose a tag to compare

@casl/[email protected]

28 Dec 20:29
Compare
Choose a tag to compare

@casl/mongoose-v2.3.0 (2018-12-28)

Features

  • mongoose: wraps resulting query into additional $and (1af1c54), closes #140

@casl/[email protected]

02 Dec 07:20
Compare
Choose a tag to compare

@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]

25 Nov 11:03
Compare
Choose a tag to compare

@casl/vue-v0.5.0 (2018-11-25)

Bug Fixes

  • README: changes links to @casl/ability to point to npm package instead to git root [skip ci] (a74086b), closes #102

Features

  • react:can: updates typescript declarations (213dcde)
  • vue: adds passThrough prop to Can (28ca883), closes #105

@casl/[email protected]

11 Nov 20:27
Compare
Choose a tag to compare

@casl/angular-v0.4.1 (2018-11-11)

Bug Fixes

  • angular: makes field to be optional argument (a3eec63), closes #126

@casl/[email protected]

11 Nov 20:07
Compare
Choose a tag to compare

@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)

@casl/[email protected]

11 Nov 20:06
Compare
Choose a tag to compare

@casl/ability-v2.5.1 (2018-11-11)

Bug Fixes

  • ability: adds on method into typescript defs (86e35cc)

@casl/[email protected]

08 Nov 19:34
Compare
Choose a tag to compare

@casl/react-v0.8.1 (2018-11-08)

Bug Fixes

  • react: moves this.connectToAbility to the setState callback (#129) (9d0c839), closes #128