Add more test for login links and fix a bug on action retrieve (#2361)

* add more test for login links and fix a bug on action retrieve
This commit is contained in:
Lunny Xiao 2017-08-23 17:53:35 +08:00 committed by Lauris BH
parent 8aadf79f80
commit 64b7068846
2 changed files with 98 additions and 1 deletions

View file

@ -736,7 +736,7 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) {
var userIDCond builder.Cond = builder.Eq{"user_id": opts.RequestedUser.ID}
if opts.Collaborate {
userIDCond = userIDCond.Or(builder.Expr(
`repo_id IN (SELECT repo_id FROM "access" WHERE access.user_id = ?)`,
"repo_id IN (SELECT repo_id FROM `access` WHERE access.user_id = ?)",
opts.RequestedUser.ID))
}
cond = cond.And(userIDCond)