beta 0 rspec ruby Rubygems

Beta access restriction library

5 years after MIT

Beta Build Status

Beta is an access control library that uses a Redis whitelist to control authorization. It relies upon the Rails.env variable to check against its list of environments to trigger on.

Install

Install with gem install beta or add gem 'beta' to your Gemfile.

Then, add an initializer in your Rails application to configure Beta:

Beta.config do |config|
  redis = $redis
  uid = 'mlg_id'
  namespace    = 'awesome-app'
  redirect_url = 'http://majorleaguegaming.com'
  environments = [:production]
end

Finally, Beta requires the existence of a current_user which responds to the attribute specified in the uid configuration key used in both the whitelist and current_user_on_whitelist? methods.

Usage

By adding include Beta::AccesHelpers to ApplicationController, you get access to the following methods:

  • whitelist - Used as a before_filter to ensure the current_user has access
  • is_whitelisted?(user) checks to see if the given user is on the list.
  • current_user_on_whitelist? leverages is_whitelisted? to tell you if the current user is special.

Related Repositories

angular-2-beta-boilerplate

angular-2-beta-boilerplate

A basic boilerplate to start an Angular 2 (Beta) App. Includes Gulpfile to compi ...

opengovplatform-beta

opengovplatform-beta

This is the Release of Beta Code base of the Open Government Platform (OGPL), wh ...

docker-selenium-firefox-chrome-beta

docker-selenium-firefox-chrome-beta

A Dockerfile starting a selenium standalone server with Chrome and Firefox beta ...

django-beta

django-beta

Handle capturing email addresses for pre-beta sites ...

adding-a-beta-invitation-system-to-your-meteor-application

adding-a-beta-invitation-system-to-your-meteor-application

Learn how to send and approve beta invites in your Meteor application. ...


Top Contributors

cadwallion czarneckid hypomodern tquackenbush

Releases

-   v0.0.3 zip tar