From e58d7693ec0380a164f4f79c46e59950e6ca528c Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 12 Mar 2019 21:51:28 +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_major_schools_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ec_major_schools_controller.rb b/app/controllers/ec_major_schools_controller.rb index d2d1a978..487ca7bf 100644 --- a/app/controllers/ec_major_schools_controller.rb +++ b/app/controllers/ec_major_schools_controller.rb @@ -126,7 +126,7 @@ class EcMajorSchoolsController < ApplicationController competition_calculation_info_url: competition_calculation_info_url, score_level_setting_url: score_level_setting_url, example_major: example_major, - allow_visit: User.current.admin? || User.current.ec_school.present?, + allow_visit: User.current || (User.current.ec_school.present? && User.current.ec_school == major.school.id) } end