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