From 874936a13124718a11e87c55d883648ffd2fb0ce Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 25 Nov 2014 16:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E8=A2=AB=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 5c3503718..31463d691 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -64,7 +64,7 @@ class AttachmentsController < ApplicationController # modify by nwb # 下载添加权限设置 candown = false - if (@attachment.container.has_attribute?(:project) || @attachment.container.has_attribute?(:project_id)) && @attachment.container.project + if @attachment.container.class.to_s != "HomeworkAttach" && (@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)