mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 03:52:04 +00:00 
			
		
		
		
	Allow get release download files and lfs files with oauth2 token format (#26430)
Fix #26165 Fix #25257
This commit is contained in:
		@@ -239,3 +239,20 @@ func TestViewTagsList(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
	assert.EqualValues(t, []string{"v1.0", "delete-tag", "v1.1"}, tagNames)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestDownloadReleaseAttachment(t *testing.T) {
 | 
			
		||||
	defer tests.PrepareTestEnv(t)()
 | 
			
		||||
 | 
			
		||||
	tests.PrepareAttachmentsStorage(t)
 | 
			
		||||
 | 
			
		||||
	repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
 | 
			
		||||
 | 
			
		||||
	url := repo.Link() + "/releases/download/v1.1/README.md"
 | 
			
		||||
 | 
			
		||||
	req := NewRequest(t, "GET", url)
 | 
			
		||||
	MakeRequest(t, req, http.StatusNotFound)
 | 
			
		||||
 | 
			
		||||
	req = NewRequest(t, "GET", url)
 | 
			
		||||
	session := loginUser(t, "user2")
 | 
			
		||||
	session.MakeRequest(t, req, http.StatusOK)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user