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
container_type: Version
container_id: 1
downloads: 0
- disk_filename: 060719210727_version_file.zip
+ disk_filename: 060719210727_archive.zip
digest: b91e08d0cf966d5c6ff411bd8c4cc3a2
id: 9
filesize: 452
set_tmp_attachments_directory
end
+ def test_download_version_file_with_issue_tracking_disabled
+ Project.find(1).disable_module! :issue_tracking
+ get :download, :id => 9
+ assert_response :success
+ end
+
def test_download_should_assign_content_type_if_blank
Attachment.find(4).update_attribute(:content_type, '')