Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api_authorization

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api_authorization

  • 0.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

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
$ rails api_auth:install
  1. Next populate permissions table with your controllers and actions run:
$ rails api_auth:re_populate_permissions
  1. Include the Authorization module on your ApplicationController :
  include ActionController::Helpers
  include ApiAuthorization
  enable_role_authorization
  1. You can create/read/update/delete roles and permissions for the user through CLI commands or by using the dashboard which you need to install seperately by running:
rails api_auth:install_dashboard
  1. And after running the rails app visit:
http://localhost:3000/auth_dashboard

CLI commands

Managing Roles and Permissions

There are two ways to manage your roles and

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.

FAQs

Package last updated on 12 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc