Render direct login button only when not logged in

This commit is contained in:
Oliver Günther
2025-08-13 10:04:43 +02:00
parent c407f1b005
commit c3aefec8a4
2 changed files with 4 additions and 1 deletions
@@ -30,7 +30,7 @@
module Redmine::MenuManager::TopMenu::UserMenu
def render_user_top_menu_node(items = first_level_menu_items_for(:account_menu))
if omniauth_direct_login?
if omniauth_direct_login? && !User.current.logged?
render_direct_login
else
render_user_drop_down items
+3
View File
@@ -108,6 +108,9 @@ RSpec.describe "Omniauth authentication" do
click_link_or_button "Sign In"
expect(current_path).to eql my_account_path
# Expect the dropdown menu to be the logged in one
expect(page).to have_test_selector "op-app-header--user-menu-button"
end
end
end