Sha256: 0afb536c265c1446cd81140befebcfe3214c8c3f15c8ae286e1b604c725aba1e

Contents?: true

Size: 625 Bytes

Versions: 20

Compression:

Stored size: 625 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?(role)
      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

20 entries across 20 versions & 1 rubygems

Version Path
tuersteher-1.0.4 samples/application_controller.rb
tuersteher-1.0.3 samples/application_controller.rb
tuersteher-1.0.2 samples/application_controller.rb
tuersteher-1.0.1 samples/application_controller.rb
tuersteher-0.7.2 samples/application_controller.rb
tuersteher-0.7.1 samples/application_controller.rb
tuersteher-0.7.0 samples/application_controller.rb
tuersteher-0.6.7 samples/application_controller.rb
tuersteher-0.6.6 samples/application_controller.rb
tuersteher-0.6.5 samples/application_controller.rb
tuersteher-0.6.4 samples/application_controller.rb
tuersteher-0.6.3 samples/application_controller.rb
tuersteher-0.6.2 samples/application_controller.rb
tuersteher-0.6.1 samples/application_controller.rb
tuersteher-0.6.0 samples/application_controller.rb
tuersteher-0.5.2 samples/application_controller.rb
tuersteher-0.5.1 samples/application_controller.rb
tuersteher-0.5.0 samples/application_controller.rb
tuersteher-0.4.1 samples/application_controller.rb
tuersteher-0.4.0 samples/application_controller.rb