@@ -108,10 +108,10 class Issue < ActiveRecord::Base | |||||
108 | when 'all' |
|
108 | when 'all' | |
109 | nil |
|
109 | nil | |
110 | when 'default' |
|
110 | when 'default' | |
111 | user_ids = [user.id] + user.groups.map(&:id) |
|
111 | user_ids = [user.id] + user.groups.map(&:id).compact | |
112 | "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" |
|
112 | "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" | |
113 | when 'own' |
|
113 | when 'own' | |
114 | user_ids = [user.id] + user.groups.map(&:id) |
|
114 | user_ids = [user.id] + user.groups.map(&:id).compact | |
115 | "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" |
|
115 | "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" | |
116 | else |
|
116 | else | |
117 | '1=0' |
|
117 | '1=0' |
General Comments 0
You need to be logged in to leave comments.
Login now