Skip to content

Commit 8dd9206

Browse files
chore(release): @casl/[email protected] [skip ci]
1 parent 4e9a4b4 commit 8dd9206

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

packages/casl-angular/CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

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

5+
# [@casl/angular-v2.0.0](https://github.com/stalniy/casl/compare/@casl/[email protected]...@casl/[email protected]) (2019-02-10)
6+
7+
8+
### Bug Fixes
9+
10+
* **packages:** increases peerDependency of [@casl](https://github.com/casl)/ability ([9f6a7b8](https://github.com/stalniy/casl/commit/9f6a7b8)), closes [#119](https://github.com/stalniy/casl/issues/119)
11+
12+
13+
### Features
14+
15+
* **ability:** adds support for `manage` action ([d9ab56c](https://github.com/stalniy/casl/commit/d9ab56c)), closes [#119](https://github.com/stalniy/casl/issues/119)
16+
17+
18+
### BREAKING CHANGES
19+
20+
* **ability:** `manage` is not anymore an alias for CRUD but represents any action.
21+
22+
Let's consider the next example:
23+
24+
```js
25+
const ability = AbilityBuilder.define((can) => {
26+
can('manage', 'Post')
27+
can('read', 'User')
28+
})
29+
```
30+
31+
In @casl/ability@2.x the definition above produces the next results:
32+
33+
```js
34+
ability.can('read', 'Post') // true
35+
ability.can('publish', 'Post') // false, because `manage` is an alias for CRUD
36+
```
37+
38+
In @casl/ability@3.x the results:
39+
40+
```js
41+
ability.can('read', 'Post') // true
42+
ability.can('publish', 'Post') // true, because `manage` represents any action
43+
```
44+
45+
To migrate the code, just replace `manage` with `crud` and everything will work as previously.
46+
547
# [@casl/angular-v1.0.0](https://github.com/stalniy/casl/compare/@casl/[email protected]...@casl/[email protected]) (2018-12-02)
648

749

packages/casl-angular/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/casl-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@casl/angular",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"description": "Angular module for CASL which makes it easy to add permissions in any Angular application",
55
"main": "dist/umd/index.js",
66
"module": "dist/es5m/index.js",

0 commit comments

Comments
 (0)