|
|
@ -2169,7 +2169,7 @@ module ApplicationHelper
|
|
|
|
candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
|
|
|
candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
|
|
|
elsif attachment.container.is_a?(OrgSubfield)
|
|
|
|
elsif attachment.container.is_a?(OrgSubfield)
|
|
|
|
org = attachment.container.organization
|
|
|
|
org = attachment.container.organization
|
|
|
|
candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2
|
|
|
|
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)
|
|
|
|
elsif attachment.container.is_a?(OrgDocumentComment)
|
|
|
|
elsif attachment.container.is_a?(OrgDocumentComment)
|
|
|
|
org = attachment.container.organization
|
|
|
|
org = attachment.container.organization
|
|
|
|
candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
|
|
|
candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1)
|
|
|
|