博客资源下载问题

This commit is contained in:
lizanle 2015-12-14 11:19:43 +08:00
parent 7c114e1a13
commit c5f903146d
1 changed files with 2 additions and 0 deletions

View File

@ -1934,6 +1934,8 @@ module ApplicationHelper
candown = true
elsif attachment.container.class.to_s=="StudentWork"
candown = true
elsif attachment.container.class.to_s=="BlogComment"
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