Skip to content

Commit

Permalink
chore(release): @casl/[email protected] [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Feb 4, 2019
1 parent 8a301dc commit 49b50c4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions packages/casl-ability/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@

All notable changes to this project will be documented in this file.

# [@casl/ability-v3.0.0](https://github.com/stalniy/casl/compare/@casl/[email protected]...@casl/[email protected]) (2019-02-04)


### Bug Fixes

* **ability:** prevent creation of `manage` alias ([4ca1268](https://github.com/stalniy/casl/commit/4ca1268)), closes [#119](https://github.com/stalniy/casl/issues/119)
* **ability:** updates ts definitions for `Ability` ([2c989b2](https://github.com/stalniy/casl/commit/2c989b2)), closes [#119](https://github.com/stalniy/casl/issues/119)


### Features

* **ability:** adds support for `manage` action ([d9ab56c](https://github.com/stalniy/casl/commit/d9ab56c)), closes [#119](https://github.com/stalniy/casl/issues/119)


### BREAKING CHANGES

* **ability:** `manage` is not anymore an alias for CRUD but represents any action.

Let's consider the next example:

```js
const ability = AbilityBuilder.define((can) => {
can('manage', 'Post')
can('read', 'User')
})
```

In @casl/ability@2.x the definition above produces the next results:

```js
ability.can('read', 'Post') // true
ability.can('publish', 'Post') // false, because `manage` is an alias for CRUD
```

In @casl/ability@3.x the results:

```js
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/ability-v2.5.1](https://github.com/stalniy/casl/compare/@casl/[email protected]...@casl/[email protected]) (2018-11-11)


Expand Down
2 changes: 1 addition & 1 deletion packages/casl-ability/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/casl-ability/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@casl/ability",
"version": "2.5.1",
"version": "3.0.0",
"description": "CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access",
"main": "dist/umd/index.js",
"module": "dist/es5m/index.js",
Expand Down

0 comments on commit 49b50c4

Please sign in to comment.