mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 01:54:26 +00:00
This commit is contained in:
parent
f766719895
commit
69a2a29c33
@ -438,7 +438,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 {
|
||||
|
@ -81,7 +81,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 {
|
||||
translated = ctx.Tr("repo.issues.review.self.approval")
|
||||
|
Loading…
Reference in New Issue
Block a user