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 CanCanCan 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/RolifyCommunity/rolify.git
Authors and contributors
Author: Florent Monbillard (@EppO)
- Scott Tesoriere (@scottkf)
- Ullrich Schäfer (@stigi)
- Nicolas Fouché (@nfo)
- Wellington Cordeiro (@wldcordeiro)
Having trouble with rolify ? Check out the documentation and/or submit an issue.