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,8 +415,9 @@ func RedirectDownload(ctx *context.Context) {
|
|||
tagNames := []string{vTag}
|
||||
curRepo := ctx.Repo.Repository
|
||||
releases, err := db.Find[repo_model.Release](ctx, repo_model.FindReleasesOptions{
|
||||
RepoID: curRepo.ID,
|
||||
TagNames: tagNames,
|
||||
IncludeDrafts: ctx.Repo.CanWrite(unit.TypeReleases),
|
||||
RepoID: curRepo.ID,
|
||||
TagNames: tagNames,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("RedirectDownload", err)
|
||||
|
|
Loading…
Reference in a new issue