Sha256: 5ed19b560e4e1a52dbcc0df936d35cd70e53eb394c2c9ac6ac5c0ba5d206cfce

Contents?: true

Size: 1.09 KB

Versions: 16

Compression:

Stored size: 1.09 KB

Contents

= Tuersteher
Security-Layer for Rails-Application acts like a firewall.
It's check your URL's or Modells to have the rights for this.

== Install

  gem install tuersteher


== Usage

Create in your Rails-Application the rules-file "config/access_rules.rb"
(or copy the sample from samples-directory and modify)

Here is as small sample for "config/access_rules.rb"

  # Path-Acces-Rules
  grant_path '/', :get, :all
  grant_path '/admin-area/', :all, :ADMIN

  # Model-Acces-Rules
  grant_model Product, :view, :all
  grant_model Product, :update, :EDITOR do |product, current_user|
                         product.owner_id == current_user.id
                       end

Then extend your ApplicationController with:

  include Tuersteher::ControllerExtensions
  before_filter :check_access # methode is from Tuersteher::ControllerExtensions

Check if your authendicate-system has implemented the methods:

  * current_user
  * access_denied

and the cuurent_user should have a method

  * has_role(*roles)

If not, just implemen it (see samples/application_controller.rb)

== License

LGPL V3 (see license.txt)

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
tuersteher-0.6.3 README.rdoc
tuersteher-0.6.2 README.rdoc
tuersteher-0.6.1 README.rdoc
tuersteher-0.6.0 README.rdoc
tuersteher-0.5.2 README.rdoc
tuersteher-0.5.1 README.rdoc
tuersteher-0.5.0 README.rdoc
tuersteher-0.4.1 README.rdoc
tuersteher-0.4.0 README.rdoc
tuersteher-0.3.4 README.rdoc
tuersteher-0.3.3 README.rdoc
tuersteher-0.3.0 README.rdoc
tuersteher-0.2.2 README.rdoc
tuersteher-0.2.1 README.rdoc
tuersteher-0.1.4 README.rdoc
tuersteher-0.1.3 README.rdoc