Allow groups to be migrated as new top-level groups
What does this MR do?
Related issue: #293952 (closed)
This MR allows groups to be imported as new top-level groups on instance. To achieve this on frontend following changes were made:
- new prop
canCreateGroups
is passed via data attributes - dropdown list of the groups is generated with respect of new prop
Following changes were made on backend side:
- Relax validation on
destination_namespace
to allow empty string but notnil
- Handle empty
destination_namespace
in transformer and properly setparent_id
tonil
in this case
Video
Testing guidelines
- Enable feature
bulk_import
viaFeature.enable(:bulk_import)
- Open "New group" (
/groups/new
) - Use
https://gitlab.com
as source instance andGeK1Nis4j-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) - Select
No parent
from dropdown as target - Click
Import
- Ensure new group is imported and available (it should be empty intentionally)
Does this MR meet the acceptance criteria?
Please note, this MR is independent from !52796 (merged) - fixing status issue is solely purpose of !52796 (merged)
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Illya Klymov