公共贴吧下载文件异常
This commit is contained in:
parent
3239ab12e9
commit
4252e52d1d
|
@ -43,8 +43,13 @@ module Redmine
|
||||||
end
|
end
|
||||||
|
|
||||||
def attachments_visible?(user=User.current)
|
def attachments_visible?(user=User.current)
|
||||||
(respond_to?(:visible?) ? visible?(user) : true) &&
|
if self.respond_to?(:project)
|
||||||
user.allowed_to?(self.class.attachable_options[:view_permission], self.project)
|
(respond_to?(:visible?) ? visible?(user) : true) &&
|
||||||
|
user.allowed_to?(self.class.attachable_options[:view_permission], self.project)
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def attachments_deletable?(user=User.current)
|
def attachments_deletable?(user=User.current)
|
||||||
|
|
Loading…
Reference in New Issue