File tree 1 file changed +6
-5
lines changed 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 {
353
353
// 1. Be able to see all non-private repositories that either:
354
354
cond = cond .Or (builder .And (
355
355
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
+ ))))
361
362
}
362
363
363
364
if user != nil {
You can’t perform that action at this time.
0 commit comments