Allow also to search in inactive groups.
This commit is contained in:
parent
10e0592140
commit
a6cdde345c
2 changed files with 9 additions and 14 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue