恢复私有课程的公开资源不能引用问题(导致搜索速度慢)

This commit is contained in:
z9hang 2014-12-12 18:06:10 +08:00
parent e4439daf3b
commit 9abe730dff
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ module FilesHelper
def visable_attachemnts_insite attachments,course
result = []
attachments.each do |attachment|
if attachment_candown(attachment) || (attachment.container_type == "Course" && attachment.container_id == course.id && User.current.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
if attachment.is_public? || (attachment.container_type == "Course" && attachment.container_id == course.id && User.current.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
result << attachment
end
end