Commit 45d5bd99 authored by Kyle Wiebers's avatar Kyle Wiebers

Revert "Merge branch '246905-only-allow-multiple-reviewers-in-paid-tiers' into 'master'"

This reverts merge request !43256
parent b7f37fd6
...@@ -1690,10 +1690,6 @@ class MergeRequest < ApplicationRecord ...@@ -1690,10 +1690,6 @@ class MergeRequest < ApplicationRecord
Feature.enabled?(:merge_request_reviewers, project) Feature.enabled?(:merge_request_reviewers, project)
end end
def allows_multiple_reviewers?
false
end
private private
def with_rebase_lock def with_rebase_lock
......
...@@ -110,10 +110,6 @@ module MergeRequests ...@@ -110,10 +110,6 @@ module MergeRequests
return return
end end
unless merge_request.allows_multiple_reviewers?
params[:reviewer_ids] = params[:reviewer_ids].first(1)
end
reviewer_ids = params[:reviewer_ids].select { |reviewer_id| user_can_read?(merge_request, reviewer_id) } reviewer_ids = params[:reviewer_ids].select { |reviewer_id| user_can_read?(merge_request, reviewer_id) }
if params[:reviewer_ids].map(&:to_s) == [IssuableFinder::Params::NONE] if params[:reviewer_ids].map(&:to_s) == [IssuableFinder::Params::NONE]
......
...@@ -120,10 +120,6 @@ module EE ...@@ -120,10 +120,6 @@ module EE
project.feature_available?(:multiple_merge_request_assignees) project.feature_available?(:multiple_merge_request_assignees)
end end
def allows_multiple_reviewers?
project.feature_available?(:multiple_merge_request_reviewers)
end
def visible_blocking_merge_requests(user) def visible_blocking_merge_requests(user)
Ability.merge_requests_readable_by_user(blocking_merge_requests, user) Ability.merge_requests_readable_by_user(blocking_merge_requests, user)
end end
......
...@@ -29,7 +29,6 @@ class License < ApplicationRecord ...@@ -29,7 +29,6 @@ class License < ApplicationRecord
multiple_issue_assignees multiple_issue_assignees
multiple_ldap_servers multiple_ldap_servers
multiple_merge_request_assignees multiple_merge_request_assignees
multiple_merge_request_reviewers
project_merge_request_analytics project_merge_request_analytics
protected_refs_for_users protected_refs_for_users
push_rules push_rules
......
...@@ -118,24 +118,6 @@ RSpec.describe MergeRequest do ...@@ -118,24 +118,6 @@ RSpec.describe MergeRequest do
end end
end end
describe '#allows_multiple_reviewers?' do
it 'returns false without license' do
stub_licensed_features(multiple_merge_request_reviewers: false)
merge_request = build_stubbed(:merge_request)
expect(merge_request.allows_multiple_reviewers?).to be(false)
end
it 'returns true when licensed' do
stub_licensed_features(multiple_merge_request_reviewers: true)
merge_request = build(:merge_request)
expect(merge_request.allows_multiple_reviewers?).to be(true)
end
end
describe '#participants' do describe '#participants' do
context 'with approval rule' do context 'with approval rule' do
before do before do
......
...@@ -34,26 +34,6 @@ RSpec.shared_examples 'reviewer_ids filter' do ...@@ -34,26 +34,6 @@ RSpec.shared_examples 'reviewer_ids filter' do
it 'contains reviewers who can read the merge_request' do it 'contains reviewers who can read the merge_request' do
expect(execute.reviewers).to contain_exactly(reviewer1, reviewer2) expect(execute.reviewers).to contain_exactly(reviewer1, reviewer2)
end end
context 'with multiple_merge_request_reviewers feature on' do
before do
stub_licensed_features(multiple_merge_request_reviewers: true)
end
it 'allows multiple reviewers' do
expect(execute.reviewers).to contain_exactly(reviewer1, reviewer2)
end
end
context 'with multiple_merge_request_reviewers feature off' do
before do
stub_licensed_features(multiple_merge_request_reviewers: false)
end
it 'only allows one reviewer' do
expect(execute.reviewers).to contain_exactly(reviewer1)
end
end
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