Commit 29665e71 authored by Valery Sizov's avatar Valery Sizov Committed by Douglas Barbosa Alexandre

Exposing design repository from primary to secondary

Geo needs to be able to clone design repositories
parent 9cb33f0a
......@@ -3,8 +3,10 @@
module Gitlab
class GitAccessDesign < GitAccess
def check(cmd, _changes)
unless geo?
check_protocol!
check_can_create_design!
end
success_result(cmd)
end
......
......@@ -7,9 +7,10 @@ describe Gitlab::GitAccessDesign do
set(:project) { create(:project) }
set(:user) { project.owner }
let(:protocol) { 'web' }
let(:actor) { user }
subject(:access) do
described_class.new(user, project, protocol, authentication_abilities: [:read_project, :download_code, :push_code])
described_class.new(actor, project, protocol, authentication_abilities: [:read_project, :download_code, :push_code])
end
describe "#check!" do
......@@ -38,5 +39,15 @@ describe Gitlab::GitAccessDesign do
expect { subject }.to raise_error(::Gitlab::GitAccess::UnauthorizedError)
end
end
context 'Geo' do
let(:actor) { :geo }
context 'http protocol' do
let(:protocol) { 'http' }
it { is_expected.to be_a(::Gitlab::GitAccessResult::Success) }
end
end
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