组织资源历史版本下载权限问题

This commit is contained in:
huang 2016-05-27 10:48:28 +08:00
parent f3a1a7371d
commit afedaf3fe5
1 changed files with 1 additions and 1 deletions

View File

@ -2103,7 +2103,7 @@ module ApplicationHelper
project = Project.find(attachment_history.container_id)
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)
org = OrgSubfield.find(attachment_history.container_id).organization
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