summaryrefslogtreecommitdiffstats
path: root/app/models/version.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-29 19:36:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-29 19:36:49 +0000
commitd92c204ed3899d775e4f47d79e3fec91e44ae2c3 (patch)
treecb63bfa2864455c47f8bc1a1bd82f663f2293f9d /app/models/version.rb
parent9ed5d1dd027cb5607b9768cdf21c323dbe6536e2 (diff)
downloadredmine-d92c204ed3899d775e4f47d79e3fec91e44ae2c3.tar.gz
redmine-d92c204ed3899d775e4f47d79e3fec91e44ae2c3.zip
Fixed: version files in Files module cannot be downloaded if issue tracking is disabled (#9055).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7984 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r--app/models/version.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb
index b5f34e97f..3340be77e 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -43,6 +43,11 @@ class Version < ActiveRecord::Base
user.allowed_to?(:view_issues, self.project)
end
+ # Version files have same visibility as project files
+ def attachments_visible?(*args)
+ project.present? && project.attachments_visible?(*args)
+ end
+
def start_date
@start_date ||= fixed_issues.minimum('start_date')
end