diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-08-04 21:01:56 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-08-04 21:01:56 +0000 |
commit | 0bcde4ab284031851d53bbecf793c4d54c9b6247 (patch) | |
tree | 76e6d739985c33db2781b27243b2cd7b62ff0df7 /app/models/query.rb | |
parent | 8a2bc5772e0ef3aae1150ce55aba5f78af4749ef (diff) | |
download | redmine-0bcde4ab284031851d53bbecf793c4d54c9b6247.tar.gz redmine-0bcde4ab284031851d53bbecf793c4d54c9b6247.zip |
Fixed: assigned_to and author filters in cross project issues view should be based on user's project visibility. #5760
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3916 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index f697a721d..fd7aa3477 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -187,7 +187,7 @@ class Query < ActiveRecord::Base if project user_values += project.users.sort.collect{|s| [s.name, s.id.to_s] } else - project_ids = User.current.projects.collect(&:id) + project_ids = Project.all(:conditions => Project.visible_by(User.current)).collect(&:id) if project_ids.any? # members of the user's projects user_values += User.active.find(:all, :conditions => ["#{User.table_name}.id IN (SELECT DISTINCT user_id FROM members WHERE project_id IN (?))", project_ids]).sort.collect{|s| [s.name, s.id.to_s] } |