From f6c2693e1850acd48fb6ad11f8876933e6c4111b Mon Sep 17 00:00:00 2001 From: dataplant Date: Thu, 16 May 2024 11:27:42 +0100 Subject: [PATCH] Adding patch to deactivate (non OmniAuth) 2FA on DataHUB --- .../16.11.2-ee.0/patches/show.html.haml.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 scripts/16.11.2-ee.0/patches/show.html.haml.patch diff --git a/scripts/16.11.2-ee.0/patches/show.html.haml.patch b/scripts/16.11.2-ee.0/patches/show.html.haml.patch new file mode 100644 index 0000000..44c5ef8 --- /dev/null +++ b/scripts/16.11.2-ee.0/patches/show.html.haml.patch @@ -0,0 +1,35 @@ +--- /opt/gitlab/embedded/service/gitlab-rails/app/views/profiles/accounts/show.html.haml 2024-05-15 08:20:22.300932867 +0000 ++++ /opt/gitlab/embedded/service/gitlab-rails/app/views/profiles/accounts/show.html.haml 2024-05-16 08:10:51.990471005 +0000 +@@ -8,32 +8,6 @@ + - c.with_body do + = s_('Profiles|Some options are unavailable for LDAP accounts') + +-- if params[:two_factor_auth_enabled_successfully] +- = render Pajamas::AlertComponent.new(variant: :success, +- alert_options: { class: 'gl-my-5' }, +- close_button_options: { class: 'js-close-2fa-enabled-success-alert' }) do |c| +- - c.with_body do +- = html_escape(_('You have set up 2FA for your account! If you lose access to your 2FA device, you can use your recovery codes to access your account. Alternatively, if you upload an SSH key, you can %{anchorOpen}use that key to generate additional recovery codes%{anchorClose}.')) % { anchorOpen: ''.html_safe % { href: help_page_path('user/profile/account/two_factor_authentication', anchor: 'generate-new-recovery-codes-using-ssh') }, anchorClose: ''.html_safe } +- +-.settings-section.js-search-settings-section +- .settings-sticky-header +- .settings-sticky-header-inner +- %h4.gl-my-0 +- = s_('Profiles|Two-factor authentication') +- %p.gl-text-secondary +- = s_("Profiles|Increase your account's security by enabling two-factor authentication (2FA).") +- %div +- %p +- %span.gl-font-weight-bold +- #{_('Status')}: +- #{current_user.two_factor_enabled? ? _('Enabled') : _('Disabled')} +- - if current_user.two_factor_enabled? +- = render Pajamas::ButtonComponent.new(variant: :confirm, href: profile_two_factor_auth_path) do +- = _('Manage two-factor authentication') +- - else +- = render Pajamas::ButtonComponent.new(variant: :confirm, href: profile_two_factor_auth_path, button_options: { data: { testid: 'enable-2fa-button' }}) do +- = _('Enable two-factor authentication') +- + - if display_providers_on_profile? + .settings-section.js-search-settings-section + .settings-sticky-header