Sha256: 64c78f68a3ea5eb32ca8c9ed48fea23125b575cc4e762a18193d00b9e5e044d7

Contents?: true

Size: 534 Bytes

Versions: 7

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module SolidusAdmin::AuthenticationAdapters::Backend
  extend ActiveSupport::Concern

  included do
    delegate :admin_logout_path, to: :spree
    helper_method :admin_logout_path
  end

  private

  def authenticate_solidus_backend_user!
    return if spree_current_user

    instance_exec(&Spree::Admin::BaseController.unauthorized_redirect)
  end

  def store_location
    Spree::UserLastUrlStorer.new(self).store_location
  end

  def spree_current_user
    defined?(super) ? super : nil
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/controllers/solidus_admin/authentication_adapters/backend.rb
solidus_admin-0.3.1 app/controllers/solidus_admin/authentication_adapters/backend.rb
solidus_admin-0.3.0 app/controllers/solidus_admin/authentication_adapters/backend.rb
solidus_admin-0.2.0 app/controllers/solidus_admin/authentication_adapters/backend.rb
solidus_admin-0.1.0 app/controllers/solidus_admin/authentication_adapters/backend.rb
solidus_admin-0.0.2 app/controllers/solidus_admin/authentication_adapters/backend.rb
solidus_admin-0.0.1 app/controllers/solidus_admin/authentication_adapters/backend.rb