1
0

Implemented proper check for team rights on namespaces

This commit is contained in:
kolaente
2018-07-25 00:49:44 +02:00
committed by konrad
parent f36eeb662a
commit e602914659
2 changed files with 26 additions and 18 deletions

View File

@ -68,7 +68,7 @@ func (l *List) checkListTeamRight(user *User, r TeamRight) bool {
Join("LEFT", []string{"team_list", "tl"}, "l.id = tl.list_id").
Join("LEFT", []string{"team_members", "tm2"}, "tm2.team_id = tl.team_id").
Where("((tm.user_id = ? AND tn.right = ?) OR (tm2.user_id = ? AND tl.rights = ?)) AND l.id = ?",
user.ID, r, user.ID, r, l.ID).
user.ID, r, user.ID, r, l.ID).
Get(&List{})
if err != nil {
return false