mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	[BugFix] Hide public repos owned by private orgs (#9609)
* Restrict AllPublic to actually public repos. * Add new parameter to add in AllLimited Repos
This commit is contained in:
		@@ -177,8 +177,8 @@ func TestSearchRepository(t *testing.T) {
 | 
			
		||||
			opts:  &SearchRepoOptions{Page: 1, PageSize: 10, OwnerID: 15, AllPublic: true, Template: util.OptionalBoolFalse},
 | 
			
		||||
			count: 25},
 | 
			
		||||
		{name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborative",
 | 
			
		||||
			opts:  &SearchRepoOptions{Page: 1, PageSize: 10, OwnerID: 15, Private: true, AllPublic: true, Template: util.OptionalBoolFalse},
 | 
			
		||||
			count: 31},
 | 
			
		||||
			opts:  &SearchRepoOptions{Page: 1, PageSize: 10, OwnerID: 15, Private: true, AllPublic: true, AllLimited: true, Template: util.OptionalBoolFalse},
 | 
			
		||||
			count: 30},
 | 
			
		||||
		{name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborativeByName",
 | 
			
		||||
			opts:  &SearchRepoOptions{Keyword: "test", Page: 1, PageSize: 10, OwnerID: 15, Private: true, AllPublic: true},
 | 
			
		||||
			count: 15},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user