Fork Me on GitHub

rolify

Role management library with resource scoping

Download this project as a .zip file Download this project as a tar.gz file

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.

Dependencies

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/RolifyCommunity/rolify.git

Authors and contributors

Author: Florent Monbillard (@EppO)

Contributors:

License

MIT-License

Support

Having trouble with rolify ? Check out the documentation and/or submit an issue.