From 7c21c728de62607f6f4cba2367cb30612b388a3f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 24 Jul 2019 18:29:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 07ab97cb5..a6c74818c 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -11,8 +11,6 @@ class AttachmentsController < ApplicationController def show # 1. 优先跳到cdn # 2. 如果没有cdn,send_file - # candown = attachment_candown @file - # tip_exception(403,"您没有权限下载该附件") if !candown if @file.cloud_url.present? update_downloads(@file) redirect_to @file.cloud_url and return @@ -185,7 +183,7 @@ class AttachmentsController < ApplicationController course = @file.container&.graduation_work&.graduation_task&.course candown = current_user.member_of_course?(course) end - tip_exception(409, "您没有权限进入") if course.present? && !candown + tip_exception(403, "您没有权限进入") if course.present? && !candown end end end