Skip to content

Commit

Permalink
use right enum :)
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored Jan 5, 2020
1 parent 9df9382 commit efa0f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func SearchRepository(opts *SearchRepoOptions) (RepositoryList, int64, error) {
}

if opts.AllPublic {
accessCond = accessCond.Or(builder.Eq{"is_private": false}).And(builder.In("owner_id", builder.Select("`user`.id").From("`user`").Where(builder.Lte{"`user`.visibility": structs.VisibleTypePrivate})))
accessCond = accessCond.Or(builder.Eq{"is_private": false}).And(builder.In("owner_id", builder.Select("`user`.id").From("`user`").Where(builder.Lte{"`user`.visibility": structs.VisibleTypeLimited})))
}

cond = cond.And(accessCond)
Expand Down

0 comments on commit efa0f54

Please sign in to comment.