summaryrefslogtreecommitdiffstats
path: root/app/controllers/context_menus_controller.rb
diff options
context:
space:
mode:
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-09-03 21:43:07 +0000
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-09-03 21:43:07 +0000
commita9f5a17c678d6ebc495d42d858db0ce5727a5381 (patch)
treeb45edd6204ce41743f5f2c9b67b3ae8ca74a2769 /app/controllers/context_menus_controller.rb
parentc799d03eceab362bac7e99313a255f6569c9756a (diff)
downloadredmine-a9f5a17c678d6ebc495d42d858db0ce5727a5381.tar.gz
redmine-a9f5a17c678d6ebc495d42d858db0ce5727a5381.zip
Do not display items without valid selection in context menu when on different projects. #4998
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4059 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r--app/controllers/context_menus_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index e437a18dc..5f4b02ca2 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -13,8 +13,8 @@ class ContextMenusController < ApplicationController
memo & s
end
end
- projects = @issues.collect(&:project).compact.uniq
- @project = projects.first if projects.size == 1
+ @projects = @issues.collect(&:project).compact.uniq
+ @project = @projects.first if @projects.size == 1
@can = {:edit => (@project && User.current.allowed_to?(:edit_issues, @project)),
:log_time => (@project && User.current.allowed_to?(:log_time, @project)),