From ec42fdd5e43a8e8759da2392843e497a14800789 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 5 Mar 2020 13:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3ee75fbe5..59ec88fc7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -70,14 +70,17 @@ class ApplicationController < ActionController::Base # 实训的访问权限 def shixun_access_allowed if !current_user.shixun_permission(@shixun) - if @shixun.user_scope == 1 - school_id = @shixun.shixun_schools.first&.school_id - name = School.find_by(id: school_id)&.name - tip_exception(-5, "当前实训只对#{name}等单位开放") - else - tip_exception(403, "..") - end + tip_exception(403, "..") end + # if !current_user.shixun_permission(@shixun) + # if @shixun.user_scope == 1 + # school_id = @shixun.shixun_schools.first&.school_id + # name = School.find_by(id: school_id)&.name + # tip_exception(-5, "当前实训只对#{name}等单位开放") + # else + # tip_exception(403, "..") + # end + # end end def admin_or_business?