Fixed organization search.
This commit is contained in:
parent
579b58c620
commit
82d4084080
1 changed files with 2 additions and 2 deletions
|
@ -470,10 +470,10 @@ class TicketsController < ApplicationController
|
||||||
map( &:id )
|
map( &:id )
|
||||||
conditions = [ 'group_id IN (?)', group_ids ]
|
conditions = [ 'group_id IN (?)', group_ids ]
|
||||||
else
|
else
|
||||||
if !current_user.organization || !current_user.organization.shared
|
if !current_user.organization || ( !current_user.organization.shared || current_user.organization.shared == false )
|
||||||
conditions = [ 'customer_id = ?', current_user.id ]
|
conditions = [ 'customer_id = ?', current_user.id ]
|
||||||
else
|
else
|
||||||
conditions = [ '( customer_id = ? OR organization_id = ? )', current_user.id, current_user.organization.shared ]
|
conditions = [ '( customer_id = ? OR organization_id = ? )', current_user.id, current_user.organization.id ]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue