From f2ea879b9b9cad9ab987369cbf27cb275bcd1584 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 29 May 2015 10:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=E5=92=8C=E5=90=8C=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=9A=84=E5=AD=A6=E7=94=9F=E6=9C=89=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=B8=8B=E5=91=A8=E4=BD=9C=E5=93=81=E9=99=84=E4=BB=B6?= 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 268781df3..7f3d2c1a2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1824,7 +1824,7 @@ module ApplicationHelper def attachment_candown attachment candown = false if attachment.container - if attachment.container.class.to_s != "HomeworkAttach" && (attachment.container.has_attribute?(:project) || attachment.container.has_attribute?(:project_id)) && attachment.container.project + if attachment.container.class.to_s != "HomeworkAttach" && attachment.container.class.to_s != "StudentWork" && (attachment.container.has_attribute?(:project) || attachment.container.has_attribute?(:project_id)) && attachment.container.project project = attachment.container.project candown= User.current.member_of?(project) || (project.is_public && attachment.is_public == 1) elsif attachment.container.is_a?(Project)