unepwcmc/SAPI — pull request #328 by simaob (2014-05-28 11:11:54+00:00)
Title: Roles management

This Pull Request:

* adds an attribute, is_manager, to the User model to distinguish manages from contributors. Only managers can change the value of this attribute.
* it removes the password and password_confirmation fields from the users _form partial, as this is handled by the forgot your password feature from Devise
* it adds the CanCan gem to manage authorization. The rules are defined in app/models/ability.rb, and are checked via the authorize_resource method in the admin_controller. It sets the class to false, as the rules apply to all the actions in the controller on the admin side.
* The trade controller blocks non managers from accessing the trade admin tool

To test this, you'll need to run

`` rake db:migrate ``