公共贴吧下载文件异常

This commit is contained in:
linhk 2014-08-18 17:33:37 +08:00
parent 3239ab12e9
commit 4252e52d1d
1 changed files with 7 additions and 2 deletions

View File

@ -43,8 +43,13 @@ module Redmine
end
def attachments_visible?(user=User.current)
if self.respond_to?(:project)
(respond_to?(:visible?) ? visible?(user) : true) &&
user.allowed_to?(self.class.attachable_options[:view_permission], self.project)
else
return true
end
end
def attachments_deletable?(user=User.current)