aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/issue_content_history.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/issue_content_history.go')
-rw-r--r--routers/web/repo/issue_content_history.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/repo/issue_content_history.go b/routers/web/repo/issue_content_history.go
index dc647b8809..08eb98acb8 100644
--- a/routers/web/repo/issue_content_history.go
+++ b/routers/web/repo/issue_content_history.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
issuesModel "code.gitea.io/gitea/models/issues"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/timeutil"
@@ -87,7 +88,7 @@ func canSoftDeleteContentHistory(ctx *context.Context, issue *models.Issue, comm
canSoftDelete := false
if ctx.Repo.IsOwner() {
canSoftDelete = true
- } else if ctx.Repo.CanWrite(models.UnitTypeIssues) {
+ } 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