mirror of https://github.com/go-gitea/gitea.git
after #16069, visibility is also usefull for user, so this limit is not usefull. fix #16545
This commit is contained in:
parent
e10cd3da1e
commit
7365b4e757
|
@ -217,16 +217,14 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond {
|
||||||
cond = cond.And(accessibleRepositoryCondition(opts.Actor))
|
cond = cond.And(accessibleRepositoryCondition(opts.Actor))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Not looking at private organisations
|
// Not looking at private organisations and users
|
||||||
// We should be able to see all non-private repositories that
|
// We should be able to see all non-private repositories that
|
||||||
// isn't in a private or limited organisation.
|
// isn't in a private or limited organisation.
|
||||||
cond = cond.And(
|
cond = cond.And(
|
||||||
builder.Eq{"is_private": false},
|
builder.Eq{"is_private": false},
|
||||||
builder.NotIn("owner_id", builder.Select("id").From("`user`").Where(
|
builder.NotIn("owner_id", builder.Select("id").From("`user`").Where(
|
||||||
builder.And(
|
builder.Or(builder.Eq{"visibility": structs.VisibleTypeLimited}, builder.Eq{"visibility": structs.VisibleTypePrivate}),
|
||||||
builder.Eq{"type": UserTypeOrganization},
|
)))
|
||||||
builder.Or(builder.Eq{"visibility": structs.VisibleTypeLimited}, builder.Eq{"visibility": structs.VisibleTypePrivate}),
|
|
||||||
))))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.IsPrivate != util.OptionalBoolNone {
|
if opts.IsPrivate != util.OptionalBoolNone {
|
||||||
|
|
Loading…
Reference in New Issue