Hi,
Which is the most popular Ruby on Rails AUTHORIZATION gem/plugin at the moment?
(I am using AuthLogic for authentication by the way)
Thanks
Hi,
Which is the most popular Ruby on Rails AUTHORIZATION gem/plugin at the moment?
(I am using AuthLogic for authentication by the way)
Thanks
I like Declarative Authorization There is a pretty good railscast for it as well
Not sure about the most popular solution, but Ryan Bates (of RailsCasts fame) recently released a new authorization plugin called CanCan that looks pretty easy to use and apparently integrates well with AuthLogic. Might be worth a look.
Declarative Authorization looks quite nice as well, though I haven't used it.
I'm looking to pick one of these two solutions. The main difference is the authors implementations of the same logic. DA is expressed with a DSL (like Rake) using roles, and CanCan is expressed using native Ruby includes and class methods.
I'm going to run with CanCan for now. It seems more natural and easier to work with since I use modules over Rake-style DSLs.
Ryan Bates, the author of CanCan posted this tweet, "CanCan vs Declarative Authorization...": twitter.com/rbates/status/5789648368
which linked to both implementations side-by-side: gist.github.com/236709
Have a look @ Ruby-Toolbox - ruby-toolbox.com.
Specifically to answer your question, declarative_authorization is currently the most popular.
http://www.ruby-toolbox.com/categories/rails_authorization.html
They are listed in order of popularity. Have a glance at the right column "Popularity ranks" for a quick visual view.
I use Devise for auth and CanCan for roles. Here's how I do it if you want to take a look: http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/