Very simple Role management library without any authorization enforcement supporting scope on resource object (class checking and resource checking).
Let’s see an example:
> user.has_role?(:moderator, Forum.first) => false # if user is moderator of another Forum
This library is generic enough to be used by any authentication/authorization solutions. Look at his Tutorial if you want to checkout an example showing how to integrate rolify with CanCan and Devise.
- >= Rails 3.1
- ActiveRecord or Mongoid ORMs
In Rails 3, add this to your Gemfile and run the bundle command:
Alternatively, you can install it as a plugin:
$ rails plugin install git://github.com/EppO/rolify.git
Authors and contributors
Author: Florent Monbillard (@EppO)