Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon

Web Security Update: CASL 2.0 releases!

Save for later
  • 2 min read
  • 13 Apr 2018

article-image
CASL has released a new version 2.0 bringing with it several compelling opportunities for enhancing web app authorization methods.

CASL is an isomorphic authorization JavaScript library which allows you to fix user abilities in the system. It grants you to set permissions in order to access the required resources in the system. You need to define the permissions in a single location since you cannot duplicate them across UI components, API services, and database queries.

Some of the noteworthy changes available in CASL 2.0 are:

Package Refactoring


Refactoring is a process of changing a software system to improve the internal structure of the code without altering the external performance.  

  • The lerna project has refactored CASL 2.0 to monorepo. Because of which MongoDB related functionality is moved into a different package, thus decreasing the core library size.
  • You can find the core package at casl/ability and MongoDB related functionality at casl/mongoose, while helper function at casl/ability/extra.
  • You don’t need to worry about updating your dependencies, thanks to renovate bot.

CASL procures Frontend frameworks

  • CASL now has complementary packages for leading frontend frameworks such as React, Vue, Angular and Aurelia. You can now integrate CASL into different single page applications with ease.  
  • For more details, you can refer the README file for each library:

  • Unlock access to the largest independent learning library in Tech for FREE!
    Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
    Renews at €18.99/month. Cancel anytime

Set abilities per fields

  • Now you can set permissions per field of your application. For example if you want certain users with the ability to change the name of the product but not the product description.
  • You can see suitable form fields for different roles in the admin panel

Demo Examples


If you want demo tutorials as per CASL 2.0 and complementary packages you can visit:


If you want to start implementing CASL library in your project or work, you can visit the GitHub page.