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
501f0f23
Commit
501f0f23
authored
Jan 28, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate forwarding for approvers_overwritten?
parent
a5f4b8bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
ee/app/models/approval_state.rb
ee/app/models/approval_state.rb
+1
-0
ee/app/models/concerns/approvable_for_rule.rb
ee/app/models/concerns/approvable_for_rule.rb
+1
-6
No files found.
ee/app/models/approval_state.rb
View file @
501f0f23
...
...
@@ -38,6 +38,7 @@ class ApprovalState
def
approval_rules_overwritten?
merge_request
.
approval_rules
.
regular
.
exists?
end
alias_method
:approvers_overwritten?
,
:approval_rules_overwritten?
def
approval_needed?
return
false
unless
project
.
feature_available?
(
:merge_request_approvers
)
...
...
ee/app/models/concerns/approvable_for_rule.rb
View file @
501f0f23
...
...
@@ -11,6 +11,7 @@ module ApprovableForRule
has_approved?
any_approver_allowed?
authors_can_approve?
approvers_overwritten?
}
.
freeze
FORWARDABLE_METHODS
.
each
do
|
method
|
...
...
@@ -20,10 +21,4 @@ module ApprovableForRule
approval_state
.
public_send
(
method
,
*
args
)
# rubocop:disable GitlabSecurity/PublicSend
end
end
def
approvers_overwritten?
return
super
if
::
Feature
.
disabled?
(
:approval_rules
,
project
)
approval_state
.
approval_rules_overwritten?
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