Commit eb970f8f authored by Ash McKenzie's avatar Ash McKenzie

fixup! Allow upload_code ability for auth'd Geo request

parent c48ad0fb
...@@ -52,11 +52,6 @@ module EE ...@@ -52,11 +52,6 @@ module EE
def geo? def geo?
actor == :geo actor == :geo
end end
override :authed_via_jwt?
def authed_via_jwt?
geo?
end
end end
end end
end end
...@@ -278,37 +278,18 @@ describe "Git HTTP requests (Geo)" do ...@@ -278,37 +278,18 @@ describe "Git HTTP requests (Geo)" do
response response
end end
context 'when gl_id is not correctly provided via HTTP headers' do context 'when gl_id is incorrectly provided via HTTP headers' do
context "as it's empty" do where(:geo_gl_id) do
where(:geo_gl_id) do [
[ nil,
nil, ''
'' ]
]
end
with_them do
it 'returns a 403' do
is_expected.to have_gitlab_http_status(:forbidden)
expect(response.body).to eql('You are not allowed to push code to this project.')
end
end
end end
context "as it's junk" do with_them do
where(:geo_gl_id) do it 'returns a 403' do
[ is_expected.to have_gitlab_http_status(:forbidden)
'junk', expect(response.body).to eql('You are not allowed to upload code for this project.')
'junk-1',
'kkey-1'
]
end
with_them do
it 'returns a 403' do
is_expected.to have_gitlab_http_status(:forbidden)
expect(response.body).to eql('Geo push user is invalid.')
end
end end
end end
end end
...@@ -319,7 +300,10 @@ describe "Git HTTP requests (Geo)" do ...@@ -319,7 +300,10 @@ describe "Git HTTP requests (Geo)" do
[ [
'key-999', 'key-999',
'key-1', 'key-1',
'key-999' 'key-999',
'junk',
'junk-1',
'kkey-1'
] ]
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment