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({}) assets = ticket.assets({})
# open tickets by customer # open tickets by customer
group_ids = Group.select('groups.id') access_condition = Ticket.access_condition(current_user)
.joins(:users)
.where('groups_users.user_id = ?', current_user.id)
.map(&:id)
access_condition = [ 'group_id IN (?)', group_ids ]
ticket_lists = Ticket ticket_lists = Ticket
.where( .where(