diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-03 06:10:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-03 06:10:17 +0300 |
commit | bb3ea5f45e305a93a01cd203cc19b87fb511af4a (patch) | |
tree | 4efc7d25c2bb631ec4641f5e9a93c04c938b1170 /app/services/import | |
parent | d489dd79cfc33b730022b3c91c29fb8a5583b4b1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/import')
-rw-r--r-- | app/services/import/bitbucket_server_service.rb | 2 | ||||
-rw-r--r-- | app/services/import/github_service.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/services/import/bitbucket_server_service.rb b/app/services/import/bitbucket_server_service.rb index cdb23370ddc..d1c22f06464 100644 --- a/app/services/import/bitbucket_server_service.rb +++ b/app/services/import/bitbucket_server_service.rb @@ -21,6 +21,8 @@ module Import if project.persisted? success(project) + elsif project.errors[:import_source_disabled].present? + error(project.errors[:import_source_disabled], :forbidden) else log_and_return_error(project_save_error(project), :unprocessable_entity) end diff --git a/app/services/import/github_service.rb b/app/services/import/github_service.rb index a891dcc11e3..033f6bcb043 100644 --- a/app/services/import/github_service.rb +++ b/app/services/import/github_service.rb @@ -25,6 +25,8 @@ module Import if project.persisted? success(project) + elsif project.errors[:import_source_disabled].present? + error(project.errors[:import_source_disabled], :forbidden) else error(project_save_error(project), :unprocessable_entity) end |