修复课程成员不能加入作业中私有资源的BUG
This commit is contained in:
parent
59c143a9f1
commit
82aa52e44f
|
@ -84,7 +84,10 @@ class AttachmentsController < ApplicationController
|
|||
candown= User.current.member_of_course?(course) || (course.is_public==1 && @attachment.is_public == 1)
|
||||
elsif @attachment.container.class.to_s=="HomeworkAttach" && @attachment.container.bid.reward_type == 3
|
||||
candown = true
|
||||
elsif @attachment.container_type == "Bid" && @attachment.container && @attachment.container.courses
|
||||
candown = User.current.member_of_course?(@attachment.container.courses.first) || (course.is_public == 1 && @attachment.is_public == 1)
|
||||
else
|
||||
|
||||
candown = @attachment.is_public == 1
|
||||
end
|
||||
if candown || User.current.admin? || User.current.id == @attachment.author_id
|
||||
|
|
Loading…
Reference in New Issue