aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/issue_content_history.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-03-22 08:03:22 +0100
committerGitHub <noreply@github.com>2022-03-22 15:03:22 +0800
commit80fd25524e13dedbdc3527b32d008de152213a89 (patch)
tree63b2bfe4ffaf1dce12080cabdc2e845c8731a673 /routers/web/repo/issue_content_history.go
parent5495ba7660979973ba19e304786135da474e0e64 (diff)
downloadgitea-80fd25524e13dedbdc3527b32d008de152213a89.tar.gz
gitea-80fd25524e13dedbdc3527b32d008de152213a89.zip
Renamed ctx.User to ctx.Doer. (#19161)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/repo/issue_content_history.go')
-rw-r--r--routers/web/repo/issue_content_history.go4
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)
}