From 858150b3f9b1bc7103ab76ead208fc9c2d3837ff Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 10 Jun 2017 09:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3a9ded118..67cb8248f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2534,10 +2534,10 @@ module ApplicationHelper candown = User.current.member_of?(project) || (project.is_public && attachment.is_public == 1) elsif (attachment.container.has_attribute?(:course) ||attachment.container.has_attribute?(:course_id) ) && attachment.container.course course = attachment.container.course - candown = User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 + candown = syllabus_course_member(User.current, course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 elsif attachment.container.is_a?(Course) course = attachment.container - candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 + candown= syllabus_course_member(User.current, course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 elsif attachment.container.is_a?(OrgSubfield) org = attachment.container.organization candown = User.current.member_of_org?(org) || ((attachment.is_public == 1 || attachment.get_status_by_attach(User.current.id) == 2) && org.allow_guest_download == true)