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
fddabfd2
Commit
fddabfd2
authored
Jul 07, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
respect can_override_approvers in create and update services
parent
99706f3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/services/merge_requests/create_service.rb
app/services/merge_requests/create_service.rb
+6
-0
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+6
-0
No files found.
app/services/merge_requests/create_service.rb
View file @
fddabfd2
...
...
@@ -9,6 +9,12 @@ module MergeRequests
params
[
:target_project_id
]
||=
source_project
.
id
unless
@project
.
can_override_approvers?
params
.
delete
(
:approvals_before_merge
)
params
.
delete
(
:approver_ids
)
params
.
delete
(
:approver_group_ids
)
end
merge_request
=
MergeRequest
.
new
merge_request
.
source_project
=
source_project
merge_request
.
source_branch
=
params
[
:source_branch
]
...
...
app/services/merge_requests/update_service.rb
View file @
fddabfd2
...
...
@@ -17,6 +17,12 @@ module MergeRequests
merge_request
.
merge_params
[
'force_remove_source_branch'
]
=
params
.
delete
(
:force_remove_source_branch
)
end
unless
project
.
can_override_approvers?
params
.
delete
(
:approvals_before_merge
)
params
.
delete
(
:approver_ids
)
params
.
delete
(
:approver_group_ids
)
end
old_approvers
=
merge_request
.
overall_approvers
.
to_a
handle_wip_event
(
merge_request
)
...
...
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