Skip to content

Commit 3c9601e

Browse files
authored
Revert "not show private user's repo in explore view (go-gitea#16550)"
This reverts commit 9102738.
1 parent 4b6370c commit 3c9601e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

models/repo_list.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,16 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond {
217217
cond = cond.And(accessibleRepositoryCondition(opts.Actor))
218218
}
219219
} else {
220-
// Not looking at private organisations and users
220+
// Not looking at private organisations
221221
// We should be able to see all non-private repositories that
222222
// isn't in a private or limited organisation.
223223
cond = cond.And(
224224
builder.Eq{"is_private": false},
225225
builder.NotIn("owner_id", builder.Select("id").From("`user`").Where(
226-
builder.Or(builder.Eq{"visibility": structs.VisibleTypeLimited}, builder.Eq{"visibility": structs.VisibleTypePrivate}),
227-
)))
226+
builder.And(
227+
builder.Eq{"type": UserTypeOrganization},
228+
builder.Or(builder.Eq{"visibility": structs.VisibleTypeLimited}, builder.Eq{"visibility": structs.VisibleTypePrivate}),
229+
))))
228230
}
229231

230232
if opts.IsPrivate != util.OptionalBoolNone {

0 commit comments

Comments
 (0)