Skip to content

Correctly handle scenario when no top-level groups are available

What does this MR do?

Related issue: #300241 (closed)

This MR fixes import_groups app blowing up, when there are no top-level group available on our side. Additionally it cleans some obsolete checks - when user has no "can create group" permission - he/she simply can't access entire flow, so no need for extra checks in Vue space

Testing guidelines (simpliest way)

  • Enable feature bulk_import via Feature.enable(:bulk_import)
  • As admin user go to list of your users and impersonate as user with no groups (if your GDK install is default one, first one will work)
  • Open "New group" (/groups/new)
  • Use https://gitlab.com as source instance and GeK1Nis4j-SY1X4sqE5c as personal access token (this token is from separate user on GitLab instance with 0 real data available, so we do not expose any security risks here)
  • Check that all groups have No parent preselected as target namespace and no other items in dropdown
  • Click Import
  • Ensure new group is imported and available (it should be empty intentionally)

Video

Users___Admin_Area___GitLab

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

No changelog as functionality is behind feature flag

Edited by Illya Klymov

Merge request reports