File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -353,11 +353,12 @@ func accessibleRepositoryCondition(user *User) builder.Cond {
353353 // 1. Be able to see all non-private repositories that either:
354354 cond = cond .Or (builder .And (
355355 builder.Eq {"`repository`.is_private" : false },
356- builder .Or (
357- // A. Aren't in organisations __OR__
358- builder .NotIn ("`repository`.owner_id" , builder .Select ("id" ).From ("`user`" ).Where (builder.Eq {"type" : UserTypeOrganization })),
359- // B. Isn't a private organisation. Limited is OK as long as we're logged in.
360- builder .NotIn ("`repository`.owner_id" , builder .Select ("id" ).From ("`user`" ).Where (builder .In ("visibility" , orgVisibilityLimit ))))))
356+ // 2. Aren't in an private organisation or limited organisation if we're not logged in
357+ builder .NotIn ("`repository`.owner_id" , builder .Select ("id" ).From ("`user`" ).Where (
358+ builder .And (
359+ builder.Eq {"type" : UserTypeOrganization },
360+ builder .In ("visibility" , orgVisibilityLimit )),
361+ ))))
361362 }
362363
363364 if user != nil {
You can’t perform that action at this time.
0 commit comments