Implemented proper check for team rights on namespaces
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user