|
|
|
@ -2049,9 +2049,11 @@ module ApplicationHelper
|
|
|
|
|
course = attachment.container
|
|
|
|
|
candown= User.current.member_of_course?(course) || (course.is_public==1 && attachment.is_public == 1)
|
|
|
|
|
elsif attachment.container.is_a?(OrgSubfield)
|
|
|
|
|
candown = true
|
|
|
|
|
org = attachment.container.organization
|
|
|
|
|
candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
|
|
|
|
elsif attachment.container.is_a?(OrgDocumentComment)
|
|
|
|
|
candown = true
|
|
|
|
|
org = attachment.container.organization
|
|
|
|
|
candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
|
|
|
|
elsif (attachment.container.has_attribute?(:board) || attachment.container.has_attribute?(:board_id)) && attachment.container.board &&
|
|
|
|
|
attachment.container.board.course
|
|
|
|
|
course = attachment.container.board.course
|
|
|
|
|