Allow downloading attachments of draft releases (#31369)
Fix #31362 (cherry picked from commit 42718d32af9d259205bee0fde818ffc0c3a9797f)
This commit is contained in:
parent
ff43d02803
commit
813bf24445
1 changed files with 3 additions and 2 deletions
|
@ -415,6 +415,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,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue