summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-04-11 16:16:20 +0000
committerStan Hu <stanhu@gmail.com>2019-04-11 16:16:20 +0000
commitff4cc94413db515f4b028859a61f2c70bdff1020 (patch)
tree83ae17fb408aa75946bd9fddba76df060ea5be81
parentfac27e4a488545b779de4d9fc0ec2dafa39bc14d (diff)
parente925dddea740b0152ed2b786f74f94ab53e6c310 (diff)
downloadgitlab-ce-ff4cc94413db515f4b028859a61f2c70bdff1020.tar.gz
Merge branch 'patch-31' into 'master'
Add missing provider_unauthorized method to import_github.rb Closes #60347 See merge request gitlab-org/gitlab-ce!27218
-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 bb4e536cf57..e7504051808 100644
--- a/lib/api/import_github.rb
+++ b/lib/api/import_github.rb
@@ -20,6 +20,10 @@ module API
def provider
:github
end
+
+ def provider_unauthorized
+ error!("Access denied to your #{Gitlab::ImportSources.title(provider.to_s)} account.", 401)
+ end
end
desc 'Import a GitHub project' do