From 64a51a1759fcf94292c486be5e5198c31debac50 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 19 Aug 2019 10:30:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index d3317e99e..3d6e20ee9 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -172,7 +172,10 @@ class AttachmentsController < ApplicationController # 课堂资源、作业、毕设相关资源的权限判断 if @file.container.is_a?(Course) course = @file.container + Rails.logger.info("@@@@@@@@@@@@######################## course_id#{course.id}") candown = current_user.member_of_course?(course) || @file.is_public == 1 + Rails.logger.info("@@@@@@@@@@@@######################## public #{@file.is_public}") + Rails.logger.info("@@@@@@@@@@@@#########################{candown}") elsif @file.container.is_a?(HomeworkCommon) || @file.container.is_a?(GraduationTask) || @file.container.is_a?(GraduationTopic) course = @file.container&.course candown = current_user.member_of_course?(course)