mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-09 16:55:16 +00:00
Allow downloading attachments of draft releases (#31369)
Fix #31362 (cherry picked from commit 42718d32af9d259205bee0fde818ffc0c3a9797f)
This commit is contained in:
parent
ff43d02803
commit
813bf24445
|
@ -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