From 24b88fe32639e2d10d083866628fd5581bdaa8dc Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 14 Jun 2017 09:42:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E8=B5=84=E6=BA=90=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 04f336731..e0d5d280b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -376,7 +376,7 @@ class ApplicationController < ActionController::Base if @attachment.get_status_by_attach(User.current.id) == 2 return true else - allowed = User.current.allowed_to?(:course_attachments_download, @course, :global => false) + allowed = syllabus_course_member(User.current, @course) || @attachment.is_public == 1 end else return true