From afedaf3fe56c4d6008ecf9026f4c550bd8f61123 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 27 May 2016 10:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E8=B5=84=E6=BA=90=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E7=89=88=E6=9C=AC=E4=B8=8B=E8=BD=BD=E6=9D=83=E9=99=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= 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 8c060bfbf..691c2b0ad 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2103,7 +2103,7 @@ module ApplicationHelper project = Project.find(attachment_history.container_id) candown = User.current.member_of?(project) || (project.is_public && attachment_history.is_public == 1) elsif attachment_history.container_type == "OrgSubfield" - org = OrgSubfield.find(attachment_history.container_id) + org = OrgSubfield.find(attachment_history.container_id).organization candown = User.current.member_of_org?(org) || (org.organization.is_public && attachment_history.is_public == 1 && (User.current.logged? || org.organization.allow_guest_download?)) end end