mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fix issue pasted image missing if no release permission (#16520)
* Fix issue pasted image missing if no release permission * Update routers/web/web.go Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		@@ -827,9 +827,14 @@ func RegisterRoutes(m *web.Route) {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
			ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
 | 
								ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		m.Get("/attachments/{uuid}", repo.GetAttachment)
 | 
					
 | 
				
			||||||
	}, ignSignIn, context.RepoAssignment, context.UnitTypes(), reqRepoReleaseReader)
 | 
						}, ignSignIn, context.RepoAssignment, context.UnitTypes(), reqRepoReleaseReader)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// to maintain compatibility with old attachments
 | 
				
			||||||
 | 
						m.Group("/{username}/{reponame}", func() {
 | 
				
			||||||
 | 
							m.Get("/attachments/{uuid}", repo.GetAttachment)
 | 
				
			||||||
 | 
						}, ignSignIn, context.RepoAssignment, context.UnitTypes())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	m.Group("/{username}/{reponame}", func() {
 | 
						m.Group("/{username}/{reponame}", func() {
 | 
				
			||||||
		m.Post("/topics", repo.TopicsPost)
 | 
							m.Post("/topics", repo.TopicsPost)
 | 
				
			||||||
	}, context.RepoAssignment, context.RepoMustNotBeArchived(), reqRepoAdmin)
 | 
						}, context.RepoAssignment, context.RepoMustNotBeArchived(), reqRepoAdmin)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user