mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Backport #28025 by @6543 --- *Sponsored by Kithara Software GmbH* Co-authored-by: 6543 <m.huber@kithara.com>
This commit is contained in:
		@@ -652,12 +652,12 @@ func AccessibleRepositoryCondition(user *user_model.User, unitType unit.Type) bu
 | 
				
			|||||||
				userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType),
 | 
									userOrgTeamUnitRepoCond("`repository`.id", user.ID, unitType),
 | 
				
			||||||
			)
 | 
								)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		cond = cond.Or(
 | 
							// 4. Repositories that we directly own
 | 
				
			||||||
			// 4. Repositories that we directly own
 | 
							cond = cond.Or(builder.Eq{"`repository`.owner_id": user.ID})
 | 
				
			||||||
			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
 | 
								// 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
 | 
						return cond
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user