Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Upstream
Gitea
Commits
918e6405
Commit
918e6405
authored
5 years ago
by
Lunny Xiao
Committed by
Antoine GIRARD
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix wrong identify poster on a migrated pull request when submi… (#9827) (#9831)
parent
9809fe27
release/v1.10
v1.10.6
v1.10.4
v1.10.3
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/issue.go
+1
-1
models/issue.go
routers/repo/pull_review.go
+1
-3
routers/repo/pull_review.go
with
2 additions
and
4 deletions
+2
-4
models/issue.go
View file @
918e6405
...
...
@@ -429,7 +429,7 @@ func (issue *Issue) HashTag() string {
// IsPoster returns true if given user by ID is the poster.
func
(
issue
*
Issue
)
IsPoster
(
uid
int64
)
bool
{
return
issue
.
PosterID
==
uid
return
issue
.
OriginalAuthorID
==
0
&&
issue
.
PosterID
==
uid
}
func
(
issue
*
Issue
)
hasLabel
(
e
Engine
,
labelID
int64
)
bool
{
...
...
This diff is collapsed.
Click to expand it.
routers/repo/pull_review.go
View file @
918e6405
...
...
@@ -117,9 +117,7 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) {
// can not approve/reject your own PR
case
models
.
ReviewTypeApprove
,
models
.
ReviewTypeReject
:
if
issue
.
Poster
.
ID
==
ctx
.
User
.
ID
{
if
issue
.
IsPoster
(
ctx
.
User
.
ID
)
{
var
translated
string
if
reviewType
==
models
.
ReviewTypeApprove
{
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help