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)