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.
Dependencies
- >= Rails 3.1
- ActiveRecord or Mongoid ORMs
Installation
In Rails 3, add this to your Gemfile and run the bundle command:
gem 'rolify'
Alternatively, you can install it as a plugin:
$ rails plugin install git://github.com/EppO/rolify.git
Authors and contributors
Author: Florent Monbillard (@EppO)
Contributors: Scott Tesoriere (@scottkf), Ullrich Schäfer (@stigi), Nicolas Fouché (@nfo)
License
MIT-License
Support
Having trouble with rolify ? Check out the documentation and/or submit an issue.