RubyFlow The Ruby and Rails community linklog

Alternative to CanCan: ActionAccess

Action Access is a very lightweight and straightforward access control system for Rails. It boils down to this:

class ArticlesController < ApplicationController
  let :admin, :all
  let :user, [:index, :show]
  # ...
end

This will automatically lock the controller allowing admins to access every action, users only to show or index articles and anyone else will be rejected and redirected with an alert. It bundles a set of handy model and view additions and configurations… Read more »

Comments

I didn’t actually write this post, but RubyFlow no longer supports unauthenticated user posts, so any posts I edit become mine, lol. Sorry to the original author!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in