Commit 3c7b2632 authored by Simon Knox's avatar Simon Knox

allow rebase for unapproved merge requests

parent c67c4fb1
...@@ -15,7 +15,6 @@ module EE ...@@ -15,7 +15,6 @@ module EE
def rebase def rebase
return access_denied! unless @merge_request.can_be_merged_by?(current_user) return access_denied! unless @merge_request.can_be_merged_by?(current_user)
return render_404 unless @merge_request.approved?
RebaseWorker.perform_async(@merge_request.id, current_user.id) RebaseWorker.perform_async(@merge_request.id, current_user.id)
......
---
title: allow rebase for unapproved merge requests
merge_request:
author:
...@@ -371,12 +371,12 @@ describe Projects::MergeRequestsController do ...@@ -371,12 +371,12 @@ describe Projects::MergeRequestsController do
context 'approvals pending' do context 'approvals pending' do
let(:project) { create(:project, approvals_before_merge: 1) } let(:project) { create(:project, approvals_before_merge: 1) }
it 'returns 404' do it 'returns 200' do
expect_rebase_worker.never expect_rebase_worker
post_rebase post_rebase
expect(response.status).to eq(404) expect(response.status).to eq(200)
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