From cc71edc65626f2a8780c49c69bf7caf38b1994ad Mon Sep 17 00:00:00 2001 From: Martin Wortschack Date: Thu, 29 Dec 2022 12:01:32 +0100 Subject: [PATCH 1/4] GitLab Migration: Add visibility settings warning Adds a warning about visibility settings to GitLab Migration and updates the handbook Chagenlog: added --- .../import_groups/components/import_table.vue | 16 ++++++++++++++++ doc/user/group/import/index.md | 9 +++++++++ locale/gitlab.pot | 3 +++ 3 files changed, 28 insertions(+) diff --git a/app/assets/javascripts/import_entities/import_groups/components/import_table.vue b/app/assets/javascripts/import_entities/import_groups/components/import_table.vue index 6412f26fde7074..f18c487295f73d 100644 --- a/app/assets/javascripts/import_entities/import_groups/components/import_table.vue +++ b/app/assets/javascripts/import_entities/import_groups/components/import_table.vue @@ -98,6 +98,9 @@ export default { pendingGroupsIds: [], importTargets: {}, unavailableFeaturesAlertVisible: true, + helpUrl: helpPagePath('ee/user/group/import', { + anchor: 'visibility-rules', + }), }; }, @@ -570,6 +573,19 @@ export default { + + + + +
diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md index 6050307401d159..c764254d85565f 100644 --- a/doc/user/group/import/index.md +++ b/doc/user/group/import/index.md @@ -58,6 +58,15 @@ Not all group and project resources are imported. See list of migrated resources - [Migrated group items](#migrated-group-items). - [Migrated project items](#migrated-project-items). +### Visibility rules + +- Private groups and projects will always stay private after migration. +- Public groups and projects will: + - Stay public when imported into a public group. + - Become private when imported into a private group. + +If you rely on a private network on your source instance to hide content from the general public, make sure to have a similar setup on the destination instance, or to import into a private group. + ### Preparation GitLab maps users and their contributions correctly provided: diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 24c42cc5433902..dd5e83113b2a76 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -7359,6 +7359,9 @@ msgstr "" msgid "BulkImport|%{feature} (require v%{version})" msgstr "" +msgid "BulkImport|Be aware of %{linkStart}visibility rules%{linkEnd} when importing groups." +msgstr "" + msgid "BulkImport|Destination" msgstr "" -- GitLab From 78b30296b4cce22d48e0aa0e2240b0f4ecfd89d8 Mon Sep 17 00:00:00 2001 From: Martin Wortschack Date: Thu, 29 Dec 2022 14:58:40 +0100 Subject: [PATCH 2/4] Fix component specs --- .../import_groups/components/import_table.vue | 1 + .../import_groups/components/import_table_spec.js | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/import_entities/import_groups/components/import_table.vue b/app/assets/javascripts/import_entities/import_groups/components/import_table.vue index f18c487295f73d..a15cb05b3b7a86 100644 --- a/app/assets/javascripts/import_entities/import_groups/components/import_table.vue +++ b/app/assets/javascripts/import_entities/import_groups/components/import_table.vue @@ -543,6 +543,7 @@ export default {
{ const findPaginationDropdownText = () => findPaginationDropdown().find('button').text(); const findSelectionCount = () => wrapper.find('[data-test-id="selection-count"]'); const findNewPathCol = () => wrapper.find('[data-test-id="new-path-col"]'); + const findUnavailableFeaturesWarning = () => + wrapper.find('[data-testid="unavailable-features-alert"]'); const triggerSelectAllCheckbox = (checked = true) => wrapper.find('thead input[type=checkbox]').setChecked(checked); @@ -588,8 +590,8 @@ describe('import table', () => { }); await waitForPromises(); - expect(wrapper.findComponent(GlAlert).exists()).toBe(true); - expect(wrapper.findComponent(GlAlert).text()).toContain('projects (require v14.8.0)'); + expect(findUnavailableFeaturesWarning().exists()).toBe(true); + expect(findUnavailableFeaturesWarning().text()).toContain('projects (require v14.8.0)'); }); it('does not renders alert when there are no unavailable features', async () => { @@ -607,7 +609,7 @@ describe('import table', () => { }); await waitForPromises(); - expect(wrapper.findComponent(GlAlert).exists()).toBe(false); + expect(findUnavailableFeaturesWarning().exists()).toBe(false); }); }); }); -- GitLab From be90fbac1bd126ff668b6d62198a7a3d2b794cd9 Mon Sep 17 00:00:00 2001 From: Martin Wortschack Date: Thu, 29 Dec 2022 14:59:32 +0100 Subject: [PATCH 3/4] Clean up imports --- .../import_groups/components/import_table_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/frontend/import_entities/import_groups/components/import_table_spec.js b/spec/frontend/import_entities/import_groups/components/import_table_spec.js index 1bd53c6289e9f2..52465184c37928 100644 --- a/spec/frontend/import_entities/import_groups/components/import_table_spec.js +++ b/spec/frontend/import_entities/import_groups/components/import_table_spec.js @@ -1,4 +1,4 @@ -import { GlAlert, GlEmptyState, GlIcon, GlLoadingIcon } from '@gitlab/ui'; +import { GlEmptyState, GlIcon, GlLoadingIcon } from '@gitlab/ui'; import { mount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import VueApollo from 'vue-apollo'; -- GitLab From b18b29ec90616f787b0be2467fbadc9a4c43de51 Mon Sep 17 00:00:00 2001 From: Martin Wortschack Date: Thu, 5 Jan 2023 19:13:54 +0100 Subject: [PATCH 4/4] Apply TW suggestions --- doc/user/group/import/index.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md index c764254d85565f..94c45c0d1e3767 100644 --- a/doc/user/group/import/index.md +++ b/doc/user/group/import/index.md @@ -60,12 +60,15 @@ Not all group and project resources are imported. See list of migrated resources ### Visibility rules -- Private groups and projects will always stay private after migration. -- Public groups and projects will: +After migration: + +- Private groups and projects stay private. +- Public groups and projects: - Stay public when imported into a public group. - Become private when imported into a private group. -If you rely on a private network on your source instance to hide content from the general public, make sure to have a similar setup on the destination instance, or to import into a private group. +If used a private network on your source instance to hide content from the general public, +make sure to have a similar setup on the destination instance, or to import into a private group. ### Preparation -- GitLab