Api Authorization (The gem is in development)

A multiple role-based authorization, based on controller actions.

Tests Ruby Gem License: MIT

Database Model

db_model

Installation

Add this line to your application's Gemfile:

gem 'api_authorization'

And then execute:

$ bundle

Or install it yourself as:

$ gem install api_authorization

Usage

  1. After you have created your users_table(through devise or manually) next run bash $ rails api_auth:initialize
  2. Next populate permissions table with your controllers and actions run: bash $ rails api_auth:create_permissions
  3. Include the Authorization module on your ApplicationController : ruby include ActionController::Helpers include ApiAuthorization enable_role_authorization
  4. DONE
More CLI commands will be published soon

Contributing

Feel free to suggest a feature or report a bug.

Code Of Conduct

License

The gem is available as open source under the terms of the MIT License.