Rails CanCanCan database-driven authorization - Abilities in Database

If you are reading this post, it means you already know a thing or two about Ruby on Rails and CanCanCan. As users of this amazing gem, we know how easy it is to set up authorization for users using abilities. Like all worldly things, everything comes with a good part and a bad part.Recently, I published a post on setting up Authorization using CanCanCan but I came across several inputs, suggestions, and critics about the same in various social media. You can read about it here. Here are some of the points that are important:The ability file grows large as the application grows and hence, hard to maintain.Every change to the abilities requires a redeployment of the application. Overkill?Well, Pundit is favored by some because of its concept of writing policies for each resource which is pretty easy to maintain.
Rails CanCanCan database-driven authorization - Abilities in Database #ruby #rubydeveloper #rubyonrails #authorization #database-driven https://rubyonrails.ba/single/rails-cancancan-database-driven-authorization-abilities-in-database

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles