恢复私有课程的公开资源不能引用问题(导致搜索速度慢)
This commit is contained in:
parent
e4439daf3b
commit
9abe730dff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue