on /api/v1/scores, make users with UserManager not see scores by restricted users

This commit is contained in:
Morgan Bazalgette 2018-01-02 12:30:32 +01:00
parent 3130863456
commit 39078d00a3

View File

@ -88,7 +88,7 @@ SELECT
FROM scores
INNER JOIN users ON users.id = scores.userid
INNER JOIN users_stats ON users_stats.id = scores.userid
WHERE scores.beatmap_md5 = ? AND scores.completed = '3' AND `+md.User.OnlyUserPublic(true)+
WHERE scores.beatmap_md5 = ? AND scores.completed = '3' AND `+md.User.OnlyUserPublic(false)+
` `+genModeClause(md)+`
`+sort+common.Paginate(md.Query("p"), md.Query("l"), 100), beatmapMD5)
if err != nil {