aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/release.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/release.go')
-rw-r--r--routers/web/repo/release.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go
index df1fd745d8..20f6ddd2a5 100644
--- a/routers/web/repo/release.go
+++ b/routers/web/repo/release.go
@@ -12,6 +12,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
@@ -102,7 +103,7 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
}
ctx.Data["Tags"] = tags
- writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases)
+ writeAccess := ctx.Repo.CanWrite(unit.TypeReleases)
ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived
opts := models.FindReleasesOptions{
@@ -186,7 +187,7 @@ func SingleRelease(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.release.releases")
ctx.Data["PageIsReleaseList"] = true
- writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases)
+ writeAccess := ctx.Repo.CanWrite(unit.TypeReleases)
ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived
release, err := models.GetRelease(ctx.Repo.Repository.ID, ctx.Params("*"))