Skip to content
代码片段 群组 项目
未验证 提交 27ebd1af 编辑于 作者: Rahul Chanila's avatar Rahul Chanila 提交者: GitLab
浏览文件

Merge branch...

Merge branch '454403-direct-transfer-import-with-project-not-available-when-no-parent-group-is-selected' into 'master' 

Direct transfer - Fix "Import with projects" button not showing

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148613



Merged-by: default avatarRahul Chanila <rchanila@gitlab.com>
Approved-by: default avatarSharmad Nachnolkar <snachnolkar@gitlab.com>
Approved-by: default avatarRahul Chanila <rchanila@gitlab.com>
Co-authored-by: default avatarJustin Ho Tuan Duong <hduong@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -19,6 +19,11 @@ export function isAvailableForImport(group) { ...@@ -19,6 +19,11 @@ export function isAvailableForImport(group) {
} }
export function isProjectCreationAllowed(group = {}) { export function isProjectCreationAllowed(group = {}) {
// When "No parent" is selected
if (group.fullPath === '') {
return true;
}
return Boolean(group.projectCreationLevel) && group.projectCreationLevel !== 'noone'; return Boolean(group.projectCreationLevel) && group.projectCreationLevel !== 'noone';
} }
......
...@@ -71,5 +71,9 @@ describe('Direct transfer status utils', () => { ...@@ -71,5 +71,9 @@ describe('Direct transfer status utils', () => {
expect(isProjectCreationAllowed({ projectCreationLevel })).toBe(expected); expect(isProjectCreationAllowed({ projectCreationLevel })).toBe(expected);
}, },
); );
it('when "No parent" is selected, returns true', () => {
expect(isProjectCreationAllowed({ fullPath: '' })).toBe(true);
});
}); });
}); });
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册