0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-28 16:22:51 +01:00

Allow downloading attachments of draft releases (#31369) (#31380)

Backport #31369 by Zettat123

Fix #31362

Co-authored-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
Giteabot 2024-06-16 20:55:14 +08:00 committed by GitHub
parent 52925e9c7c
commit 3f44844244
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -418,6 +418,7 @@ func RedirectDownload(ctx *context.Context) {
tagNames := []string{vTag} tagNames := []string{vTag}
curRepo := ctx.Repo.Repository curRepo := ctx.Repo.Repository
releases, err := db.Find[repo_model.Release](ctx, repo_model.FindReleasesOptions{ releases, err := db.Find[repo_model.Release](ctx, repo_model.FindReleasesOptions{
IncludeDrafts: ctx.Repo.CanWrite(unit.TypeReleases),
RepoID: curRepo.ID, RepoID: curRepo.ID,
TagNames: tagNames, TagNames: tagNames,
}) })