|
|
|
@@ -667,15 +667,11 @@ func (repo *Repository) getReviewersPublic(e Engine, doerID, posterID int64) (_ |
|
|
|
users := make([]*User, 0) |
|
|
|
|
|
|
|
const SQLCmd = "SELECT * FROM `user` WHERE id IN ( " + |
|
|
|
"SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?) " + |
|
|
|
"UNION " + |
|
|
|
"SELECT user_id FROM `watch` WHERE repo_id = ? AND user_id NOT IN ( ?, ?) AND mode IN (?, ?) " + |
|
|
|
") ORDER BY name" |
|
|
|
"SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?) ) ORDER BY name " |
|
|
|
|
|
|
|
if err = e. |
|
|
|
SQL(SQLCmd, |
|
|
|
repo.ID, AccessModeRead, doerID, posterID, |
|
|
|
repo.ID, doerID, posterID, RepoWatchModeNormal, RepoWatchModeAuto). |
|
|
|
repo.ID, AccessModeRead, doerID, posterID). |
|
|
|
Find(&users); err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
|