restricted users only see repos in orgs witch there team was assigned to

This commit is contained in:
m.huber
2023-11-13 20:06:14 +01:00
parent 0c655c4ff0
commit 5bc3b8655c
2 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -160,7 +160,8 @@ func BuildCanSeeUserCondition(actor *User) builder.Cond {
// or private users who do follow them
cond = cond.Or(builder.Eq{
"`user`.visibility": structs.VisibleTypePrivate,
"`user`.id": builder.Select("follow.user_id").From("follow").Where(builder.Eq{"follow.follow_id": actor.ID})})
"`user`.id": builder.Select("follow.user_id").From("follow").Where(builder.Eq{"follow.follow_id": actor.ID}),
})
}
// Don't forget about self
return cond.Or(builder.Eq{"`user`.id": actor.ID})