mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Fix visibility of forked public repos from private orgs (#11717)
* Fix visibility of forked public repos from private orgs * update forks visibility when org visibility is changed Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							594db7fb43
						
					
				
				
					commit
					94f60e199b
				
			| @@ -1454,7 +1454,7 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e | ||||
| 			return fmt.Errorf("getRepositoriesByForkID: %v", err) | ||||
| 		} | ||||
| 		for i := range forkRepos { | ||||
| 			forkRepos[i].IsPrivate = repo.IsPrivate | ||||
| 			forkRepos[i].IsPrivate = repo.IsPrivate || repo.Owner.Visibility == api.VisibleTypePrivate | ||||
| 			if err = updateRepository(e, forkRepos[i], true); err != nil { | ||||
| 				return fmt.Errorf("updateRepository[%d]: %v", forkRepos[i].ID, err) | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user