Sha256: a5114c83b3544597ee8df15419d6e5dd81b97fff22e40ca8f35a11939fec202b

Contents?: true

Size: 623 Bytes

Versions: 6

Compression:

Stored size: 623 Bytes

Contents

module RefineryAuthenticationDeviseAdminControllerDecorator
  protected
  # this is an override of an existing method in Refinery::AdminController
  def authenticate_refinery_user!
    begin
      super
    rescue Zilch::Authorisation::NotAuthorisedException
      session["return_to"] = request.path
      redirect_to refinery.login_path and return
    end
  end

  private
  def authorisation_manager
    # defined in app/decorators/controllers/action_controller_base_decorator.rb
    refinery_authorisation_manager
  end
end

Refinery::AdminController.send :prepend, RefineryAuthenticationDeviseAdminControllerDecorator

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refinerycms-authentication-devise-2.0.0 app/decorators/controllers/refinery/admin_controller_decorator.rb
refinerycms-authentication-devise-1.0.4 app/decorators/controllers/refinery/admin_controller_decorator.rb
refinerycms-authentication-devise-1.0.3 app/decorators/controllers/refinery/admin_controller_decorator.rb
refinerycms-authentication-devise-1.0.2 app/decorators/controllers/refinery/admin_controller_decorator.rb
refinerycms-authentication-devise-1.0.1 app/decorators/controllers/refinery/admin_controller_decorator.rb
refinerycms-authentication-devise-1.0.0 app/decorators/controllers/refinery/admin_controller_decorator.rb