From d7177713ff5e6c9e06de517c207666b9a0c83ea1 Mon Sep 17 00:00:00 2001 From: huang Date: Sun, 14 Aug 2016 11:16:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8B=BE=E9=80=89=E6=B8=B8=E5=AE=A2=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=B8=B8=E5=AE=A2=E8=83=BD=E5=A4=9F=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2d5455b67..da66f249b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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