summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 00:08:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 00:08:52 +0000
commit38c1da5195bdcaab0b20bf6303a675b9283ac476 (patch)
tree0619c87e942aa03fb6e1c050daabe961f8d01e0a /app/services
parentab5672c13d7fe5c79fdeac10e7505187cf4ba606 (diff)
downloadgitlab-ce-38c1da5195bdcaab0b20bf6303a675b9283ac476.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r--app/services/projects/create_service.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb
index ac19f21ffc7..8ad2b0ac761 100644
--- a/app/services/projects/create_service.rb
+++ b/app/services/projects/create_service.rb
@@ -294,6 +294,9 @@ module Projects
return if INTERNAL_IMPORT_SOURCES.include?(import_type)
+ # Skip validation when creating project from a built in template
+ return if @params[:import_export_upload].present? && import_type == 'gitlab_project'
+
unless ::Gitlab::CurrentSettings.import_sources&.include?(import_type)
raise ImportSourceDisabledError, "#{import_type} import source is disabled"
end