|
|
|
@ -2023,7 +2023,7 @@ module ApplicationHelper
|
|
|
|
|
candown = User.current.member_of?(project) || (project.is_public && attachment_history.is_public == 1)
|
|
|
|
|
elsif attachment_history.container_type == "OrgSubfield"
|
|
|
|
|
org = OrgSubfield.find(attachment_history.container_id)
|
|
|
|
|
candown = User.current.member_of_org?(org) || (org.organization.is_public && attachment_history.is_public == 1)
|
|
|
|
|
candown = User.current.member_of_org?(org) || (org.organization.is_public && attachment_history.is_public == 1 && (User.current.logged? || org.organization.allow_guest_download?))
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|