Merge branch 'szzh' into develop
This commit is contained in:
commit
7268acf3c6
|
@ -116,6 +116,7 @@ module FilesHelper
|
||||||
|
|
||||||
def attachment_candown attachment
|
def attachment_candown attachment
|
||||||
candown = false
|
candown = false
|
||||||
|
if attachment.container
|
||||||
if attachment.container.class.to_s != "HomeworkAttach" && (attachment.container.has_attribute?(:project) || attachment.container.has_attribute?(:project_id)) && attachment.container.project
|
if attachment.container.class.to_s != "HomeworkAttach" && (attachment.container.has_attribute?(:project) || attachment.container.has_attribute?(:project_id)) && attachment.container.project
|
||||||
project = attachment.container.project
|
project = attachment.container.project
|
||||||
candown= User.current.member_of?(project) || (project.is_public && attachment.is_public == 1)
|
candown= User.current.member_of?(project) || (project.is_public && attachment.is_public == 1)
|
||||||
|
@ -144,6 +145,7 @@ module FilesHelper
|
||||||
else
|
else
|
||||||
candown = (attachment.is_public == 1 || attachment.is_public == true)
|
candown = (attachment.is_public == 1 || attachment.is_public == true)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
candown
|
candown
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue