CASL - це бібліотека, що допомогає інтегрувати прості права доступу в зрозумілій формі та розширяти їх з часом. Оскільки CASL написаний на чистому ES6, то його можна використовувати з довільною ORM, HTTP або UI framework-ом. А допоміжні пакети дозволять інтегруватись без додаткових зусиль.
2. Who am I and what I do here?
Experience:
● working from dark times of IE6
● PHP, Ruby, Nodejs, ~Java and .NET Core
Hobbies:
● chess, books
● articles , open source contribution
12. How to CASL
Evolve ACL as requirements evolve1
What’s special in CASL?
Declarative configuration2
In-memory validation and database queries3
MongoDB-like conditions4
Serializable rules5
15. How to CASLPermissions: writer
can create Article
can read Article
where published = true
can read, update Article
where author = me
can delete, publish Article
where author = me and published = false
can read, update User
where id = me
29. Downloads
/ month
Github
stars
Size
(gzip)
Last updated Tree
shaking
Instance
validation
Attribute
validation
DB
Queries
@casl/ability 105k 1.6k 3.9K 2 weeks ago Yes Yes Yes Yes
acl 31k 2.3k 56.6K 2 years ago No No No No
accesscontrol 44k 965 7.7K 10 months ago Maybe No Yes No
connect-roles 20k 704 5.2K 9 months ago No No No No
casbin 16k 670 34.6K 2 months ago Maybe Yes Yes No
cancan 1.7k 578 985 1 year ago No Yes No No
How to CASLCASL Alternatives