课程学生列表、教师列表接口报错问题
This commit is contained in:
parent
d7557e2839
commit
5ee37f32e2
|
@ -56,7 +56,7 @@ class CoursesService
|
|||
else
|
||||
c = Course.find(course)
|
||||
end
|
||||
if !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c)))
|
||||
if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c)))
|
||||
raise '403'
|
||||
end
|
||||
@teachers= searchTeacherAndAssistant(c)
|
||||
|
|
Loading…
Reference in New Issue