File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -528,7 +528,10 @@ type FindOrgOptions struct {
528
528
529
529
func queryUserOrgIDs (userID int64 ) * builder.Builder {
530
530
return builder .Select ("org_id" ).From ("org_user" ).
531
- Where (builder.Eq {"uid" : userID })
531
+ Where (builder.Eq {
532
+ "uid" : userID ,
533
+ "is_public" : true ,
534
+ })
532
535
}
533
536
534
537
func (opts FindOrgOptions ) toConds () builder.Cond {
@@ -538,10 +541,6 @@ func (opts FindOrgOptions) toConds() builder.Cond {
538
541
}
539
542
if ! opts .IncludePrivate {
540
543
cond = cond .And (builder.Eq {"`user`.visibility" : structs .VisibleTypePublic })
541
- } else {
542
- cond = cond .And (builder.Eq {"`user`.visibility" : structs .VisibleTypePrivate }.Or (
543
- builder.Eq {"`user`.visibility" : structs .VisibleTypeLimited },
544
- ))
545
544
}
546
545
return cond
547
546
}
You can’t perform that action at this time.
0 commit comments