Commit facc22e2 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ee into fresh_ce_upstream

parents 949d43eb 9bdd60c5
Please view this file on the master branch, on stable branches it's out of date.
v 8.9.0 (unreleased)
- Fix nil user handling in UpdateMirrorService
v 8.8.3
- Add standard web hook headers to Jenkins CI post. !374
......
......@@ -6,7 +6,7 @@ module Projects
def execute
return false unless project.mirror?
unless current_user.can?(:push_code_to_protected_branches, project)
unless can?(current_user, :push_code_to_protected_branches, project)
return error("The mirror user is not allowed to push code to all branches on this project.")
end
......
......@@ -75,6 +75,16 @@ describe Projects::UpdateMirrorService do
expect(result[:status]).to eq(:error)
end
end
describe "when no user is present" do
let(:mirror_user) { }
it "fails" do
result = subject.execute
expect(result[:status]).to eq(:error)
end
end
end
def fetch_mirror(repository)
......
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