Skip to content

Commit e4a1c93

Browse files
committed
fix visible condition
1 parent 8bb3a7c commit e4a1c93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/org.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ func (opts FindOrgOptions) toConds() builder.Cond {
459459
// return only org's actor is allowed to see
460460
if opts.Actor != nil {
461461
if !opts.Actor.IsAdmin {
462-
cond = cond.And(builder.In("`user`.visibility", structs.VisibleTypePublic, structs.VisibleTypeLimited)).Or(builder.In("`user`.`id`",
462+
cond = cond.And(builder.In("`user`.visibility", structs.VisibleTypePublic, structs.VisibleTypeLimited).Or(builder.In("`user`.`id`",
463463
builder.Select("org_user.org_id").
464464
From("org_user").
465-
Where(builder.Eq{"org_user.uid": opts.Actor.ID})))
465+
Where(builder.Eq{"org_user.uid": opts.Actor.ID}))))
466466
}
467467
} else {
468468
cond = cond.And(builder.Eq{"`user`.visibility": structs.VisibleTypePublic})

0 commit comments

Comments
 (0)