Sha256: ce1860dd00fb21f8897f11ff491f29604a4e3747f067af9e96a795d0036b8d34
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
# Beta Beta is an access control library that uses a Redis whitelist to control authorization. # Install `gem install beta` or `gem 'beta'` # Usage First we setup our initializer. ``` ruby Beta.config do |config| redis = $redis uid = 'mlg_id' namespace = 'awesome-app' redirect_url = 'http://majorleaguegaming.com' environments = [:production] end ``` Then, in our controller, include our access helpers and add the before filter: ``` include Beta::AccessHelpers before_filter :whitelist ``` Requires the existence of a `current_user` method. ## Other helpers * `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. Requires the existence of a `current_user` method.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
beta-0.0.3 | README.md |