mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Backport #26430 by @lunny Fix #26165 Fix #25257 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		| @@ -978,9 +978,6 @@ func registerRoutes(m *web.Route) { | ||||
| 		}, reqUnitAccess(unit.TypeCode, perm.AccessModeRead, false)) | ||||
| 	}, ignSignIn, context_service.UserAssignmentWeb(), context.OrgAssignment()) // for "/{username}/-" (packages, projects, code) | ||||
|  | ||||
| 	// ***** Release Attachment Download without Signin | ||||
| 	m.Get("/{username}/{reponame}/releases/download/{vTag}/{fileName}", ignSignIn, context.RepoAssignment, repo.MustBeNotEmpty, repo.RedirectDownload) | ||||
|  | ||||
| 	m.Group("/{username}/{reponame}", func() { | ||||
| 		m.Group("/settings", func() { | ||||
| 			m.Group("", func() { | ||||
| @@ -1240,8 +1237,9 @@ func registerRoutes(m *web.Route) { | ||||
| 			m.Get(".rss", feedEnabled, repo.ReleasesFeedRSS) | ||||
| 			m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom) | ||||
| 		}, ctxDataSet("EnableFeed", setting.Other.EnableFeed), | ||||
| 			repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag, true)) | ||||
| 		m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, reqRepoReleaseReader, repo.GetAttachment) | ||||
| 			repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, true)) | ||||
| 		m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, repo.GetAttachment) | ||||
| 		m.Get("/releases/download/{vTag}/{fileName}", repo.MustBeNotEmpty, repo.RedirectDownload) | ||||
| 		m.Group("/releases", func() { | ||||
| 			m.Get("/new", repo.NewRelease) | ||||
| 			m.Post("/new", web.Bind(forms.NewReleaseForm{}), repo.NewReleasePost) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user