From 020333b8f581e38e885e28f4a9a8f463ea99d00a Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 7 Dec 2023 18:58:26 +0100 Subject: [PATCH] Make people visit the log in page for mellon IAP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You can't POST login/password to the mellon login page like the log in modal does, you have to visit the page. Co-authored-by: Adrian Schröter --- src/api/app/helpers/webui/webui_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/app/helpers/webui/webui_helper.rb b/src/api/app/helpers/webui/webui_helper.rb index ed535bfc274..71bc4f35226 100644 --- a/src/api/app/helpers/webui/webui_helper.rb +++ b/src/api/app/helpers/webui/webui_helper.rb @@ -292,7 +292,11 @@ def sign_up_link(css_class: nil) end def log_in_link(css_class: nil) - if kerberos_mode? + if CONFIG['proxy_auth_mode'] == :mellon + link_to(CONFIG['proxy_auth_login_page'], class: css_class) do + link_content('Log In', css_class, 'fa-sign-in-alt') + end + elsif kerberos_mode? link_to(new_session_path, class: css_class) do link_content('Log In', css_class, 'fa-sign-in-alt') end