summaryrefslogtreecommitdiff
path: root/app/views/import
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-12-05 16:43:29 -0800
committerStan Hu <stanhu@gmail.com>2019-01-28 13:06:27 -0800
commiteafccaad7346d6e1f8d13024bb5295bc683ab046 (patch)
tree433d6ed6404f8c2edd77a03a6254c2884300974f /app/views/import
parentc2b3f64cb44114e69ddeeb453412ad4dd762baf9 (diff)
downloadgitlab-ce-eafccaad7346d6e1f8d13024bb5295bc683ab046.tar.gz
Fix Bitbucket Server import not allowing personal projects
Bitbucket Server places personal projects in a namespace called `~username`. This change allows those projects and also strips them from the GitLab namespace. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53419
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/bitbucket_server/status.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml
index ef69197e453..9280f12e187 100644
--- a/app/views/import/bitbucket_server/status.html.haml
+++ b/app/views/import/bitbucket_server/status.html.haml
@@ -56,7 +56,7 @@
.project-path.input-group-prepend
- if current_user.can_select_namespace?
- selected = params[:namespace_id] || :extra_group
- - opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.project_key, path: repo.project_key) } : {}
+ - opts = current_user.can_create_group? ? { extra_group: Group.new(name: sanitize_project_name(repo.project_key), path: sanitize_project_name(repo.project_key)) } : {}
= select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'input-group-text select2 js-select-namespace', tabindex: 1 }
- else
= text_field_tag :path, current_user.namespace_path, class: "input-group-text input-large form-control", tabindex: 1, disabled: true