From f1a7289842143b7e87abe9e8836bb7a87f8cf6be Mon Sep 17 00:00:00 2001 From: Oiza Baiye Date: Mon, 20 Oct 2025 20:37:26 -0400 Subject: [PATCH 1/2] Remove the importer_user_mapping_allow_bypass_of_confirmation FF Admin bypass of placeholder user confirmation is enabled on prod. This deletes the feature flag and completes roll out. Changelog: changed --- .../_import_and_export.html.haml | 23 +++++++++---------- ...r_mapping_allow_bypass_of_confirmation.yml | 9 -------- .../settings/import_and_export_settings.md | 8 +------ .../user_mapping/admin_bypass_authorizer.rb | 1 - .../admin_bypass_authorizer_spec.rb | 8 ------- 5 files changed, 12 insertions(+), 37 deletions(-) delete mode 100644 config/feature_flags/beta/importer_user_mapping_allow_bypass_of_confirmation.yml diff --git a/app/views/admin/application_settings/_import_and_export.html.haml b/app/views/admin/application_settings/_import_and_export.html.haml index 91316cd75eb85e..119a0faf687d56 100644 --- a/app/views/admin/application_settings/_import_and_export.html.haml +++ b/app/views/admin/application_settings/_import_and_export.html.haml @@ -27,18 +27,17 @@ - allow_contribution_mapping_to_admins_label_text = safe_format(s_('AdminSettings|Allow contribution mapping to administrators %{allow_contribution_mapping_to_admins_link_start}%{icon}%{allow_contribution_mapping_to_admins_link_end}'), tag_pair_allow_contribution_mapping_to_admins, icon: sprite_icon('question-o')) = f.label :allow_contribution_mapping_to_admins, allow_contribution_mapping_to_admins_label_text, class: 'gl-font-bold' = f.gitlab_ui_checkbox_component :allow_contribution_mapping_to_admins, s_('AdminSettings|Enabled') - - if Feature.enabled?(:importer_user_mapping_allow_bypass_of_confirmation, current_user) - .form-group - - bypass_placeholder_confirmation_help_path = help_page_path('administration/settings/import_and_export_settings.md', - anchor: 'skip-confirmation-when-administrators-reassign-placeholder-users') - - bypass_placeholder_confirmation_help_link = link_to('', bypass_placeholder_confirmation_help_path, target: '_blank', rel: 'noopener noreferrer') - - tag_pair_bypass_placeholder_confirmation = tag_pair(bypass_placeholder_confirmation_help_link, :link_start, :link_end) - - bypass_placeholder_confirmation_label_text = safe_format(s_('AdminSettings|Skip confirmation when administrators reassign placeholder users %{link_start}%{icon}%{link_end}'), tag_pair_bypass_placeholder_confirmation, icon: sprite_icon('question-o')) - = f.label :allow_bypass_placeholder_confirmation, bypass_placeholder_confirmation_label_text, class: 'gl-font-bold' - - if Gitlab.config.gitlab.impersonation_enabled - = f.gitlab_ui_checkbox_component :allow_bypass_placeholder_confirmation, s_('AdminSettings|Enabled') - - else - = f.gitlab_ui_checkbox_component :allow_bypass_placeholder_confirmation, s_('AdminSettings|Enabled'), checkbox_options: { disabled: true }, label_options: { title: s_('AdminSettings|User impersonation is not enabled on the GitLab instance.'), data: { toggle: 'tooltip', container: 'body' } } + .form-group + - bypass_placeholder_confirmation_help_path = help_page_path('administration/settings/import_and_export_settings.md', + anchor: 'skip-confirmation-when-administrators-reassign-placeholder-users') + - bypass_placeholder_confirmation_help_link = link_to('', bypass_placeholder_confirmation_help_path, target: '_blank', rel: 'noopener noreferrer') + - tag_pair_bypass_placeholder_confirmation = tag_pair(bypass_placeholder_confirmation_help_link, :link_start, :link_end) + - bypass_placeholder_confirmation_label_text = safe_format(s_('AdminSettings|Skip confirmation when administrators reassign placeholder users %{link_start}%{icon}%{link_end}'), tag_pair_bypass_placeholder_confirmation, icon: sprite_icon('question-o')) + = f.label :allow_bypass_placeholder_confirmation, bypass_placeholder_confirmation_label_text, class: 'gl-font-bold' + - if Gitlab.config.gitlab.impersonation_enabled + = f.gitlab_ui_checkbox_component :allow_bypass_placeholder_confirmation, s_('AdminSettings|Enabled') + - else + = f.gitlab_ui_checkbox_component :allow_bypass_placeholder_confirmation, s_('AdminSettings|Enabled'), checkbox_options: { disabled: true }, label_options: { title: s_('AdminSettings|User impersonation is not enabled on the GitLab instance.'), data: { toggle: 'tooltip', container: 'body' } } .form-group = f.label :max_export_size, _('Maximum export size (MiB)'), class: 'label-light' = f.number_field :max_export_size, class: 'form-control gl-form-input', title: _('Maximum size of export files.'), data: { toggle: 'tooltip', container: 'body' } diff --git a/config/feature_flags/beta/importer_user_mapping_allow_bypass_of_confirmation.yml b/config/feature_flags/beta/importer_user_mapping_allow_bypass_of_confirmation.yml deleted file mode 100644 index ab919792350078..00000000000000 --- a/config/feature_flags/beta/importer_user_mapping_allow_bypass_of_confirmation.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: importer_user_mapping_allow_bypass_of_confirmation -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/534328 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/187616 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/541373 -milestone: '17.11' -group: group::import -type: beta -default_enabled: true diff --git a/doc/administration/settings/import_and_export_settings.md b/doc/administration/settings/import_and_export_settings.md index dff9860cdca2c2..8536394db6a76e 100644 --- a/doc/administration/settings/import_and_export_settings.md +++ b/doc/administration/settings/import_and_export_settings.md @@ -116,16 +116,10 @@ To allow mapping of imported user contributions to administrators: {{< history >}} - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/534330) in GitLab 18.1 [with a flag](../feature_flags/_index.md) named `importer_user_mapping_allow_bypass_of_confirmation`. Disabled by default. +- [Generally available](https://link-to-your-MR-or-issue) in GitLab X.Y. Feature flag `importer_user_mapping_allow_bypass_of_confirmation` removed. {{< /history >}} -{{< alert type="flag" >}} - -The availability of this feature is controlled by a feature flag. -For more information, see the history. - -{{< /alert >}} - Prerequisites: - Ensure [user impersonation is not disabled](../../api/rest/authentication.md#disable-impersonation) on the GitLab instance. diff --git a/lib/import/user_mapping/admin_bypass_authorizer.rb b/lib/import/user_mapping/admin_bypass_authorizer.rb index 1d6f910359c0e7..5d0e5b18e3d2a5 100644 --- a/lib/import/user_mapping/admin_bypass_authorizer.rb +++ b/lib/import/user_mapping/admin_bypass_authorizer.rb @@ -9,7 +9,6 @@ def initialize(reassigning_user) def allowed? return false unless reassigning_user - return false unless Feature.enabled?(:importer_user_mapping_allow_bypass_of_confirmation, reassigning_user) ::Gitlab::CurrentSettings.allow_bypass_placeholder_confirmation && reassigning_user.can_admin_all_resources? && diff --git a/spec/lib/import/user_mapping/admin_bypass_authorizer_spec.rb b/spec/lib/import/user_mapping/admin_bypass_authorizer_spec.rb index ea5fcb0602324a..4a1ce255c65a53 100644 --- a/spec/lib/import/user_mapping/admin_bypass_authorizer_spec.rb +++ b/spec/lib/import/user_mapping/admin_bypass_authorizer_spec.rb @@ -17,14 +17,6 @@ expect(authorizer).to be_allowed end - context 'when the importer_user_mapping_allow_bypass_of_confirmation flag is disabled', :enable_admin_mode do - before do - stub_feature_flags(importer_user_mapping_allow_bypass_of_confirmation: false) - end - - it { is_expected.not_to be_allowed } - end - context 'when the allow_bypass_placeholder_confirmation application setting is disabled', :enable_admin_mode do before do stub_application_setting(allow_bypass_placeholder_confirmation: false) -- GitLab From 1151a4f75ec08a388a15f40cfd15fe3f259f3779 Mon Sep 17 00:00:00 2001 From: Oiza Baiye Date: Tue, 21 Oct 2025 18:12:57 -0400 Subject: [PATCH 2/2] Fix missing issue link and missing milestone --- doc/administration/settings/import_and_export_settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/administration/settings/import_and_export_settings.md b/doc/administration/settings/import_and_export_settings.md index 8536394db6a76e..bbe343c657107c 100644 --- a/doc/administration/settings/import_and_export_settings.md +++ b/doc/administration/settings/import_and_export_settings.md @@ -116,7 +116,7 @@ To allow mapping of imported user contributions to administrators: {{< history >}} - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/534330) in GitLab 18.1 [with a flag](../feature_flags/_index.md) named `importer_user_mapping_allow_bypass_of_confirmation`. Disabled by default. -- [Generally available](https://link-to-your-MR-or-issue) in GitLab X.Y. Feature flag `importer_user_mapping_allow_bypass_of_confirmation` removed. +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/541373) in GitLab 18.6. Feature flag `importer_user_mapping_allow_bypass_of_confirmation` removed. {{< /history >}} -- GitLab