summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-11 12:22:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-11 12:22:47 +0000
commit857cf5db38c23fd13f3834f773cc18c950c46d63 (patch)
treea061bbc7f363e9292355da3e56917cadfa2fb9c3 /app/models/issue.rb
parenta920184c8303b6baebebf07f5b245e3da2ad5dcd (diff)
downloadredmine-857cf5db38c23fd13f3834f773cc18c950c46d63.tar.gz
redmine-857cf5db38c23fd13f3834f773cc18c950c46d63.zip
Fixed: User with groups may not see issues assigned to him or to its groups (#9478).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7771 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 50b0dcecd..735a50ee9 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -95,10 +95,10 @@ class Issue < ActiveRecord::Base
nil
when 'default'
user_ids = [user.id] + user.groups.map(&:id)
- "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids}))"
+ "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
when 'own'
user_ids = [user.id] + user.groups.map(&:id)
- "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids}))"
+ "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
else
'1=0'
end