Web Development

Web Security Update: CASL 2.0 releases!

2 min read

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:

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.

Sunith Shetty

Data Science fanatic. Cricket fan. Series Binge watcher. You can find me hooked to my PC updating myself constantly if I am not cracking lame jokes with my team.

Share
Published by
Sunith Shetty

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago