Skip to content

Commit

Permalink
Allow downloading attachments of draft releases (#31369) (#31380)
Browse files Browse the repository at this point in the history
Backport #31369 by Zettat123

Fix #31362

Co-authored-by: Zettat123 <zettat123@gmail.com>
  • Loading branch information
GiteaBot and Zettat123 committed Jun 16, 2024
1 parent 52925e9 commit 3f44844
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routers/web/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,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)
Expand Down

0 comments on commit 3f44844

Please sign in to comment.