Skip to content

Commit 6017733

Browse files
committed
Fix visibility of organization repositories
1 parent f61a1d2 commit 6017733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/repo_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos RepositoryList, coun
150150
ownerIds = append(ownerIds, org.ID)
151151
}
152152

153-
searcherReposCond = searcherReposCond.Or(builder.In("owner_id", ownerIds))
153+
searcherReposCond = searcherReposCond.Or(builder.And(builder.In("owner_id", ownerIds), builder.Eq{"is_private": false}))
154154
if opts.Collaborate {
155155
searcherReposCond = searcherReposCond.Or(builder.Expr("id IN (SELECT repo_id FROM `access` WHERE access.user_id = ? AND owner_id != ?)",
156156
opts.Searcher.ID, opts.Searcher.ID))

0 commit comments

Comments
 (0)