summaryrefslogtreecommitdiffstats
path: root/app/controllers/context_menus_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-29 19:55:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-29 19:55:52 +0000
commitd2cc2861de766d1c0f1e38f9d1b48c16e46b2e1c (patch)
tree13f3e32012616b9619266d4df8088b5ae8fb0f67 /app/controllers/context_menus_controller.rb
parente9a0e6dbc8bff4afbd299d23431944fbab453e17 (diff)
downloadredmine-d2cc2861de766d1c0f1e38f9d1b48c16e46b2e1c.tar.gz
redmine-d2cc2861de766d1c0f1e38f9d1b48c16e46b2e1c.zip
Find visible issues only in ContextMenusController#issues.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4580 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r--app/controllers/context_menus_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index 3e1438306..373938abe 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -2,7 +2,8 @@ class ContextMenusController < ApplicationController
helper :watchers
def issues
- @issues = Issue.find_all_by_id(params[:ids], :include => :project)
+ @issues = Issue.visible.all(:conditions => {:id => params[:ids]}, :include => :project)
+
if (@issues.size == 1)
@issue = @issues.first
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)