diff options
author | JakobDev <jakobdev@gmx.de> | 2023-11-30 16:26:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 16:26:56 +0100 |
commit | 3618715fab1e5e3a26d1184398bf4134eb45e6e6 (patch) | |
tree | a6b58354e251df17437c555f5444bc979f3f8853 /routers/web/repo | |
parent | 1bfcdeef4cca0f5509476358e5931c13d37ed1ca (diff) | |
download | gitea-3618715fab1e5e3a26d1184398bf4134eb45e6e6.tar.gz gitea-3618715fab1e5e3a26d1184398bf4134eb45e6e6.zip |
Add missing variable in tag list (#28305)
This fixes a regression from #25859
If a tag has no Release, Gitea will show a Link to create a Release for
the Tag if the User has the Permission to do this, but the variable to
indicate that is no longer set.
Used here:
https://github.com/go-gitea/gitea/blob/1bfcdeef4cca0f5509476358e5931c13d37ed1ca/templates/repo/tag/list.tmpl#L39-L41
Diffstat (limited to 'routers/web/repo')
-rw-r--r-- | routers/web/repo/release.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index 761dadd544..595d599fe1 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -174,6 +174,7 @@ func TagsList(ctx *context.Context) { // Disable the showCreateNewBranch form in the dropdown on this page. ctx.Data["CanCreateBranch"] = false ctx.Data["HideBranchesInDropdown"] = true + ctx.Data["CanCreateRelease"] = ctx.Repo.CanWrite(unit.TypeReleases) && !ctx.Repo.Repository.IsArchived listOptions := db.ListOptions{ Page: ctx.FormInt("page"), |