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 6412f26fde7074c3c996261c1e38fba89276ad5f..a15cb05b3b7a86d57e616624f944589ab0f9d211 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', + }), }; }, @@ -540,6 +543,7 @@ export default { + + + + +
diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md index 6050307401d159518c28bf7e08b462607ca92c64..94c45c0d1e37674b9e65c4d7af11a9799514391e 100644 --- a/doc/user/group/import/index.md +++ b/doc/user/group/import/index.md @@ -58,6 +58,18 @@ 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 + +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 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 maps users and their contributions correctly provided: diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 24c42cc54339021dac9c358fa0e2230447983925..dd5e83113b2a76b44fe1ef75f7c273b504a12f38 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 "" 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 d094fbb0e9d5e58026c6daf3dd52272fa5fffbe4..52465184c379288a1e559e09e2893219ddf2d2a1 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'; @@ -57,6 +57,8 @@ describe('import table', () => { 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); }); }); });