Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
45d5bd99
Commit
45d5bd99
authored
Sep 30, 2020
by
Kyle Wiebers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch '246905-only-allow-multiple-reviewers-in-paid-tiers' into 'master'"
This reverts merge request !43256
parent
b7f37fd6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
51 deletions
+0
-51
app/models/merge_request.rb
app/models/merge_request.rb
+0
-4
app/services/merge_requests/base_service.rb
app/services/merge_requests/base_service.rb
+0
-4
ee/app/models/ee/merge_request.rb
ee/app/models/ee/merge_request.rb
+0
-4
ee/app/models/license.rb
ee/app/models/license.rb
+0
-1
ee/spec/models/merge_request_spec.rb
ee/spec/models/merge_request_spec.rb
+0
-18
spec/support/shared_examples/services/merge_request_shared_examples.rb
...shared_examples/services/merge_request_shared_examples.rb
+0
-20
No files found.
app/models/merge_request.rb
View file @
45d5bd99
...
@@ -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
...
...
app/services/merge_requests/base_service.rb
View file @
45d5bd99
...
@@ -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
]
...
...
ee/app/models/ee/merge_request.rb
View file @
45d5bd99
...
@@ -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
...
...
ee/app/models/license.rb
View file @
45d5bd99
...
@@ -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
...
...
ee/spec/models/merge_request_spec.rb
View file @
45d5bd99
...
@@ -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
...
...
spec/support/shared_examples/services/merge_request_shared_examples.rb
View file @
45d5bd99
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment