github stalniy/casl @casl/angular@2.0.0

latest releases: @casl/prisma@2.0.1, @casl/vue@3.0.0, @casl/react@7.0.0...
7 years ago

@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/ability@2.x 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/ability@3.x 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.

Don't miss a new casl release

NewReleases is sending notifications on new releases.