历史版本下载403问题

This commit is contained in:
huang 2016-05-27 10:34:57 +08:00
parent fb46062640
commit 7b6a62e972
1 changed files with 1 additions and 1 deletions

View File

@ -2098,7 +2098,7 @@ module ApplicationHelper
def attachment_history_candown attachment_history def attachment_history_candown attachment_history
if attachment_history.container_type == "Course" if attachment_history.container_type == "Course"
course = Course.find(attachment_history.container_id) course = Course.find(attachment_history.container_id)
candown = User.current.member_of?(course) || (course.is_public && attachment_history.is_public == 1) candown = User.current.member_of_course?(course) || (course.is_public && attachment_history.is_public == 1)
elsif attachment_history.container_type == "Project" elsif attachment_history.container_type == "Project"
project = Project.find(attachment_history.container_id) project = Project.find(attachment_history.container_id)
candown = User.current.member_of?(project) || (project.is_public && attachment_history.is_public == 1) candown = User.current.member_of?(project) || (project.is_public && attachment_history.is_public == 1)