Giter VIP home page Giter VIP logo

authoreyes_2's Introduction

Authoreyes

Gem Version Build Status Dependency Status Code Climate Test Coverage Inline docs

Authoreyes (pronounced "authorize") is intended to be a modern, Rails 5 compatible replacement for Declarative Authorization.

Installation

Add this line to your application's Gemfile:

gem 'authoreyes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install authoreyes

Usage

For Rails authorization in Rails versions 4 and below, please use Declarative Authorization or one of its forks.

Warning! This gem is not finished!

At this point, to use Authoreyes, you must do the following:

  1. Add an authorization_rules.rb file. See the included one for an example. The syntax is the same as Declarative Authorization, so you can look at their examples too.
  2. Define privileges for every single action you want to be accessed. As of now, Authoreyes has only one mode: authorize everything.
  3. Done! Authoreyes will do its job.

If you want to customize authorization behavior, in your ApplicationController override Authoreyes's redirect_if_unauthorized before_action and set_unauthorized_status_code after_action. See lib/authoreyes/helpers/in_controller for details.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tektite-software/authoreyes.

Please check out the wiki for guides on contributing to this project.

Acknowledgements

This gem was originally based on stffn's gem Declarative_Authorization. Many thanks to stffn and all who contributed to Declarative Authorization for a great gem!

License

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

Šī¸ 2016 Tektite Software

authoreyes_2's People

Contributors

zeiv avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.