From 2d327e6294193073d11233be2915bd9976b65f32 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 2 Oct 2025 14:46:23 -0400 Subject: [PATCH] Render a helpful menu of tenants temporarily --- app/controllers/concerns/authentication.rb | 4 +++- app/views/sessions/login_menu.html.erb | 15 +++++++++++++++ .../controllers/controller_authentication_test.rb | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 app/views/sessions/login_menu.html.erb diff --git a/app/controllers/concerns/authentication.rb b/app/controllers/concerns/authentication.rb index 89871a9f5..2ede3c108 100644 --- a/app/controllers/concerns/authentication.rb +++ b/app/controllers/concerns/authentication.rb @@ -37,7 +37,9 @@ module Authentication end def require_tenant - ApplicationRecord.current_tenant.present? || request_authentication + unless ApplicationRecord.current_tenant.present? + render "sessions/login_menu" + end end def require_authentication diff --git a/app/views/sessions/login_menu.html.erb b/app/views/sessions/login_menu.html.erb new file mode 100644 index 000000000..e8c78fc61 --- /dev/null +++ b/app/views/sessions/login_menu.html.erb @@ -0,0 +1,15 @@ +<% cache ApplicationRecord.tenants do %> +

We're migrating Fizzy authentication

+

+ While we migrate Fizzy away from Launchpad and 37id, please login at one of the following URLs: + +

+

+

+ Mike should have sent you your temporary password by now. If you haven't received it, please ping him! +

+<% end %> diff --git a/test/controllers/controller_authentication_test.rb b/test/controllers/controller_authentication_test.rb index 02b729089..72e0df995 100644 --- a/test/controllers/controller_authentication_test.rb +++ b/test/controllers/controller_authentication_test.rb @@ -6,7 +6,8 @@ class ControllerAuthenticationTest < ActionDispatch::IntegrationTest get cards_path - assert_redirected_to new_session_path + assert_response :success + assert_dom "h2", text: "We're migrating Fizzy authentication" end test "access with an account slug but no session redirects to new session" do