From 1d71d9ddff4880d3367351fc515036c336c567f6 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 12 Mar 2019 22:44:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ec_course_supports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ec_course_supports_controller.rb b/app/controllers/ec_course_supports_controller.rb index 8a261d11..98561981 100644 --- a/app/controllers/ec_course_supports_controller.rb +++ b/app/controllers/ec_course_supports_controller.rb @@ -221,7 +221,7 @@ class EcCourseSupportsController < ApplicationController # 职业认证的权限判断 def ec_auth - unless User.current.admin? || (User.current.ec_school.present? && @year.ec_major_school.pluck(:school_id).include?(User.current.ec_school)) + unless User.current.admin? || (User.current.ec_school.present? && @year.ec_major_school.school_id == User.current.ec_school) render_403 end end