From 774eed0dbf9c0b9d91b1e234f743405a66321ccd Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 21 Jul 2014 17:29:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=BC=80=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E7=9A=84=E4=B8=8B=E8=BD=BD=E6=9D=83=E9=99=90=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 4964bf6a6..bef128e50 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -55,10 +55,10 @@ class AttachmentsController < ApplicationController candown = false if @attachment.container.has_attribute?(:project) && @attachment.container.project project = @attachment.container.project - candown= User.current.member_of?(project) || (project.is_public==1 && @attachment.is_public == 1) + candown= User.current.member_of?(project) || (project.is_public && @attachment.is_public == 1) elsif @attachment.container.is_a?(Project) project = @attachment.container - candown= User.current.member_of?(project) || (project.is_public==1 && @attachment.is_public == 1) + candown= User.current.member_of?(project) || (project.is_public && @attachment.is_public == 1) elsif @attachment.container.has_attribute?(:course) && @attachment.container.course course = @attachment.container.course candown= User.current.member_of_course?(course) || (course.is_public==1 && @attachment.is_public == 1)