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
871381cd
Commit
871381cd
authored
Jul 15, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Prevent author from approving their own MR
parent
f8908e68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
features/project/merge_requests.feature
features/project/merge_requests.feature
+1
-1
No files found.
app/models/merge_request.rb
View file @
871381cd
...
@@ -658,7 +658,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -658,7 +658,7 @@ class MergeRequest < ActiveRecord::Base
def
approver_ids
=
(
value
)
def
approver_ids
=
(
value
)
value
.
split
(
","
).
map
(
&
:strip
).
each
do
|
user_id
|
value
.
split
(
","
).
map
(
&
:strip
).
each
do
|
user_id
|
next
if
user_id
==
author
.
id
next
if
author
&&
user_id
==
author
.
id
approvers
.
find_or_initialize_by
(
user_id:
user_id
,
target_id:
id
)
approvers
.
find_or_initialize_by
(
user_id:
user_id
,
target_id:
id
)
end
end
...
...
features/project/merge_requests.feature
View file @
871381cd
...
@@ -327,7 +327,7 @@ Feature: Project Merge Requests
...
@@ -327,7 +327,7 @@ Feature: Project Merge Requests
And
I click link
"Bug NS-04"
And
I click link
"Bug NS-04"
And
I should not see merge button
And
I should not see merge button
When
I click link
"Approve"
When
I click link
"Approve"
Then
I should see
message that merge request can be merged
Then
I should see
approved merge request
"Bug NS-04"
Scenario
:
I
can not approve merge request if I am not an approver
Scenario
:
I
can not approve merge request if I am not an approver
Given
merge request 'Bug NS-04' must be approved by some user
Given
merge request 'Bug NS-04' must be approved by some user
...
...
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