Module: Spree::PasswordProtected

Extended by:
ActiveSupport::Concern
Included in:
StoreController
Defined in:
app/controllers/concerns/spree/password_protected.rb

Instance Method Summary collapse

Instance Method Details

#redirect_to_passwordObject



9
10
11
12
13
14
15
# File 'app/controllers/concerns/spree/password_protected.rb', line 9

def redirect_to_password
  return if page_builder_enabled?
  return if session[:password_valid]
  return if turbo_frame_request?

  redirect_to password_path, status: 307 if respond_to?(:current_store) && current_store && current_store.prefers_password_protected?
end