summaryrefslogtreecommitdiffstats
path: root/app/helpers/versions_helper.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-10-18 02:28:27 +0000
committerGo MAEDA <maeda@farend.jp>2020-10-18 02:28:27 +0000
commitba016c5d77c6a79782e7dd086b4ef2a0b26688ed (patch)
tree26595f17673d3edf117b04092d962b0141cc97cd /app/helpers/versions_helper.rb
parente48ff4882010df59f467433979fe27ebec39c0ee (diff)
downloadredmine-ba016c5d77c6a79782e7dd086b4ef2a0b26688ed.tar.gz
redmine-ba016c5d77c6a79782e7dd086b4ef2a0b26688ed.zip
Invalid links to versions with sharing in project tree (#32860).
Patch by Alexander Meindl. git-svn-id: http://svn.redmine.org/redmine/trunk@20149 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/versions_helper.rb')
-rw-r--r--app/helpers/versions_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/versions_helper.rb b/app/helpers/versions_helper.rb
index 219ced3d3..36b1b511d 100644
--- a/app/helpers/versions_helper.rb
+++ b/app/helpers/versions_helper.rb
@@ -31,11 +31,11 @@ module VersionsHelper
options = {:fixed_version_id => version, :set_filter => 1}.merge(options)
project =
case version.sharing
- when 'hierarchy', 'tree'
- if version.project && version.project.root.visible?
+ when 'tree'
+ if version.project && version.project.root.visible? && User.current.allowed_to?(:view_issues, version.project.root)
version.project.root
else
- version.project
+ nil
end
when 'system'
nil