Sha256: 88e5c8d62ce665aa4e0f487d714851d72b26d1fe0bc56ca325b067081681c497

Contents?: true

Size: 627 Bytes

Versions: 14

Compression:

Stored size: 627 Bytes

Contents

class ApplicationController  < ActionController::Base



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

  # This method need Tuersteher for his rules-check
  # It should return a User-Object, which have a method "has_role?"
  #
  # This is here a dummy Stub-Implementation
  def current_user
    user = Object.new
    def user.has_role?(*roles)
      true
    end
    user
  end

  # This Method is called from Tuersteher if access are denied (no grant rules fired)
  # stub Authentication-Methode
  def access_denied
    redirect_to "/"
  end

end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
bledig-tuersteher-0.0.5 samples/application_controller.rb
tuersteher-0.3.4 samples/application_controller.rb
tuersteher-0.3.3 samples/application_controller.rb
tuersteher-0.3.0 samples/application_controller.rb
tuersteher-0.2.2 samples/application_controller.rb
tuersteher-0.2.1 samples/application_controller.rb
tuersteher-0.1.4 samples/application_controller.rb
tuersteher-0.1.3 samples/application_controller.rb
tuersteher-0.1.2 samples/application_controller.rb
tuersteher-0.1.1 samples/application_controller.rb
tuersteher-0.1.0 samples/application_controller.rb
tuersteher-0.0.8 samples/application_controller.rb
tuersteher-0.0.7 samples/application_controller.rb
tuersteher-0.0.6 samples/application_controller.rb