Allow also to search in inactive groups.

This commit is contained in:
Martin Edenhofer 2016-05-22 23:17:46 +02:00
parent 10e0592140
commit a6cdde345c
2 changed files with 9 additions and 14 deletions

View file

@ -116,12 +116,7 @@ class TicketsController < ApplicationController
assets = ticket.assets({})
# open tickets by customer
group_ids = Group.select('groups.id')
.joins(:users)
.where('groups_users.user_id = ?', current_user.id)
.map(&:id)
access_condition = [ 'group_id IN (?)', group_ids ]
access_condition = Ticket.access_condition(current_user)
ticket_lists = Ticket
.where(