mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 14:31:02 +00:00 
			
		
		
		
	Backport #28025 by @6543 --- *Sponsored by Kithara Software GmbH* Co-authored-by: 6543 <m.huber@kithara.com>
This commit is contained in:
		
					parent
					
						
							
								bc6477b36b
							
						
					
				
			
			
				commit
				
					
						073d8c50dd
					
				
			
		
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -652,12 +652,12 @@ func AccessibleRepositoryCondition(user *user_model.User, unitType unit.Type) bu | |||
| 				userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType), | ||||
| 			) | ||||
| 		} | ||||
| 		cond = cond.Or( | ||||
| 			// 4. Repositories that we directly own | ||||
| 			builder.Eq{"`repository`.owner_id": user.ID}, | ||||
| 		// 4. Repositories that we directly own | ||||
| 		cond = cond.Or(builder.Eq{"`repository`.owner_id": user.ID}) | ||||
| 		if !user.IsRestricted { | ||||
| 			// 5. Be able to see all public repos in private organizations that we are an org_user of | ||||
| 			userOrgPublicRepoCond(user.ID), | ||||
| 		) | ||||
| 			cond = cond.Or(userOrgPublicRepoCond(user.ID)) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return cond | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue