Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-29 22:21:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-29 22:21:38 +0300
commit11e9b7b58837da351f08c18e6f0f4faba4d7d301 (patch)
treed9b28159a53c3814c8a2e6b33a5f01557b757439 /lib/api/import_github.rb
parent2b0b97e746e327c6168505df7740e667b690a27f (diff)
Add latest changes from gitlab-org/security/gitlab@13-1-stable-ee
Diffstat (limited to 'lib/api/import_github.rb')
-rw-r--r--lib/api/import_github.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb
index 21d4928193e..f31cc15dc62 100644
--- a/lib/api/import_github.rb
+++ b/lib/api/import_github.rb
@@ -4,6 +4,10 @@ module API
class ImportGithub < Grape::API
rescue_from Octokit::Unauthorized, with: :provider_unauthorized
+ before do
+ forbidden! unless Gitlab::CurrentSettings.import_sources&.include?('github')
+ end
+
helpers do
def client
@client ||= Gitlab::LegacyGithubImport::Client.new(params[:personal_access_token], client_options)