module Alchemy::Solidus::SpreeAdminBaseControllerPatch
Public Class Methods
Source
# File lib/patches/backend/controllers/alchemy/solidus/spree_admin_base_controller_patch.rb, line 6 def self.prepended(base) if Alchemy.user_class_name == "::Alchemy::User" base.unauthorized_redirect = -> do if spree_current_user flash[:error] = I18n.t("spree.authorization_failure") redirect_to spree.root_path else store_location redirect_to Alchemy.login_path end end end end