Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Use dedicated admin login for devise generator (#12726)

Damian Legawiecea220870655a
diff --git a/core/lib/generators/spree/authentication/devise/templates/authentication_helpers.rb.tt b/core/lib/generators/spree/authentication/devise/templates/authentication_helpers.rb.tt
index e5f8c7e49c..331cb30d22 100644
--- a/core/lib/generators/spree/authentication/devise/templates/authentication_helpers.rb.tt
+++ b/core/lib/generators/spree/authentication/devise/templates/authentication_helpers.rb.tt
@@ -38,13 +38,13 @@ module Spree
end
def spree_admin_login_path(opts = {})
- spree_login_path(opts)
+ new_session_path(Spree.admin_user_class.model_name.singular_route_key, opts)
end
def spree_admin_logout_path(opts = {})
- spree_logout_path(opts)
+ destroy_session_path(Spree.admin_user_class.model_name.singular_route_key, opts)
end
end
end
-ApplicationController.include Spree::AuthenticationHelpers if defined?(ApplicationController)
\ No newline at end of file
+ApplicationController.include Spree::AuthenticationHelpers if defined?(ApplicationController)