From d92c204ed3899d775e4f47d79e3fec91e44ae2c3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 29 Nov 2011 19:36:49 +0000 Subject: 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 --- app/models/version.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/models/version.rb') 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 -- cgit v1.2.3