From 6b546551b6eab35072685b2eba103bb1fe2a9e0d Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 10 Apr 2019 12:48:53 +0000 Subject: Add missing provider_unauthroized method to import_github.rb --- lib/api/import_github.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb index bb4e536cf57..342efe3949b 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.", 500) + end end desc 'Import a GitHub project' do -- cgit v1.2.3 From 0984637faf778b1174f56688857cd3b2a008c478 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 10 Apr 2019 21:37:05 +0000 Subject: Fix trailing white space --- lib/api/import_github.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb index 342efe3949b..1975f894440 100644 --- a/lib/api/import_github.rb +++ b/lib/api/import_github.rb @@ -20,7 +20,7 @@ module API def provider :github end - + def provider_unauthorized error!("Access denied to your #{Gitlab::ImportSources.title(provider.to_s)} account.", 500) end -- cgit v1.2.3 From e925dddea740b0152ed2b786f74f94ab53e6c310 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 11 Apr 2019 06:43:09 +0000 Subject: Return a `401` error code --- lib/api/import_github.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb index 1975f894440..e7504051808 100644 --- a/lib/api/import_github.rb +++ b/lib/api/import_github.rb @@ -22,7 +22,7 @@ module API end def provider_unauthorized - error!("Access denied to your #{Gitlab::ImportSources.title(provider.to_s)} account.", 500) + error!("Access denied to your #{Gitlab::ImportSources.title(provider.to_s)} account.", 401) end end -- cgit v1.2.3