changeset 1625:808a40a7cac7 live

Have a go at fixing #570 Can't delete downloadable file from version in project with no issue tracker
author Chris Cannam
date Thu, 07 Feb 2019 13:48:00 +0000
parents 8bc0cee5d93f
children 44cbe9fa0b4e
files lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb	Fri Aug 10 12:21:05 2018 +0100
+++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb	Thu Feb 07 13:48:00 2019 +0000
@@ -48,7 +48,7 @@
         end
 
         def attachments_deletable?(user=User.current)
-          (respond_to?(:visible?) ? visible?(user) : true) &&
+          (respond_to?(:attachments_visible?) ? attachments_visible?(user) : true) &&
             user.allowed_to?(self.class.attachable_options[:delete_permission], self.project)
         end