From acebefc987faf019bff8c7f3bdbb34555d923761 Mon Sep 17 00:00:00 2001 From: zhangshenjerry <1375181337@qq.com> Date: Wed, 22 Jul 2015 11:00:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5-=E5=8A=A9?= =?UTF-8?q?=E6=95=99=E5=85=B3=E9=97=AD=E8=AF=BE=E7=A8=8B=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a0a61786c..5eb21af6a 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -605,7 +605,7 @@ class CoursesController < ApplicationController def toggleCourse @course_prefs = Course.find_by_extra(@course.extra) - unless (@course_prefs.teacher == User.current || User.current.admin?) + unless (@course_prefs.student != User.current || User.current.admin?) render_403 end end