勾选游客后,游客能够下载资源

This commit is contained in:
huang 2016-08-14 11:16:43 +08:00
parent 7c28f97208
commit d7177713ff
1 changed files with 1 additions and 1 deletions

View File

@ -2172,7 +2172,7 @@ module ApplicationHelper
candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
elsif attachment.container.is_a?(OrgDocumentComment)
org = attachment.container.organization
candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
elsif (attachment.container.has_attribute?(:board) || attachment.container.has_attribute?(:board_id)) && attachment.container.board &&
attachment.container.board.course
course = attachment.container.board.course