diff options
Diffstat (limited to 'routers/web/repo/issue_content_history.go')
-rw-r--r-- | routers/web/repo/issue_content_history.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/issue_content_history.go b/routers/web/repo/issue_content_history.go index ed9468b913..0d3b236689 100644 --- a/routers/web/repo/issue_content_history.go +++ b/routers/web/repo/issue_content_history.go @@ -99,11 +99,11 @@ func canSoftDeleteContentHistory(ctx *context.Context, issue *models.Issue, comm } else if ctx.Repo.CanWrite(unit.TypeIssues) { if comment == nil { // the issue poster or the history poster can soft-delete - canSoftDelete = ctx.User.ID == issue.PosterID || ctx.User.ID == history.PosterID + canSoftDelete = ctx.Doer.ID == issue.PosterID || ctx.Doer.ID == history.PosterID canSoftDelete = canSoftDelete && (history.IssueID == issue.ID) } else { // the comment poster or the history poster can soft-delete - canSoftDelete = ctx.User.ID == comment.PosterID || ctx.User.ID == history.PosterID + canSoftDelete = ctx.Doer.ID == comment.PosterID || ctx.Doer.ID == history.PosterID canSoftDelete = canSoftDelete && (history.IssueID == issue.ID) canSoftDelete = canSoftDelete && (history.CommentID == comment.ID) } |