课程大纲上传的附件允许所有人下载

This commit is contained in:
cxt 2016-10-09 09:56:36 +08:00
parent b123192286
commit c1e2642a61
1 changed files with 2 additions and 0 deletions

View File

@ -2280,6 +2280,8 @@ module ApplicationHelper
candown = true
elsif attachment.container.class.to_s=="Memo" #论坛资源允许下载
candown = true
elsif attachment.container.class.to_s=="Syllabus" #论坛资源允许下载
candown = true
elsif attachment.container.class.to_s == "User"
candown = (attachment.is_public == 1 || attachment.is_public == true || attachment.author_id == User.current.id)
elsif attachment.container_type == "Bid" && attachment.container && attachment.container.courses