Commit 8be28faf authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'revert-19211f3d' into 'master'

Revert '246905-only-allow-multiple-reviewers-in-paid-tiers' [RUN AS-IF-FOSS]

Closes #259253

See merge request gitlab-org/gitlab!43916
parents d2fb31ec 45d5bd99
......@@ -1690,10 +1690,6 @@ class MergeRequest < ApplicationRecord
Feature.enabled?(:merge_request_reviewers, project)
end
def allows_multiple_reviewers?
false
end
private
def with_rebase_lock
......
......@@ -110,10 +110,6 @@ module MergeRequests
return
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) }
if params[:reviewer_ids].map(&:to_s) == [IssuableFinder::Params::NONE]
......
......@@ -120,10 +120,6 @@ module EE
project.feature_available?(:multiple_merge_request_assignees)
end
def allows_multiple_reviewers?
project.feature_available?(:multiple_merge_request_reviewers)
end
def visible_blocking_merge_requests(user)
Ability.merge_requests_readable_by_user(blocking_merge_requests, user)
end
......
......@@ -29,7 +29,6 @@ class License < ApplicationRecord
multiple_issue_assignees
multiple_ldap_servers
multiple_merge_request_assignees
multiple_merge_request_reviewers
project_merge_request_analytics
protected_refs_for_users
push_rules
......
......@@ -118,24 +118,6 @@ RSpec.describe MergeRequest do
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
context 'with approval rule' do
before do
......
......@@ -34,26 +34,6 @@ RSpec.shared_examples 'reviewer_ids filter' do
it 'contains reviewers who can read the merge_request' do
expect(execute.reviewers).to contain_exactly(reviewer1, reviewer2)
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
......
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