1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 10:48:37 +00:00

Allow downloading attachments of draft releases (#31369)

Fix #31362
This commit is contained in:
Zettat123
2024-06-15 12:20:14 +08:00
committed by GitHub
parent 84cbb6c4d2
commit 42718d32af

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,
}) })