From 7a28b31a468914174a50123f178f53283cb4be56 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 18 Mar 2020 20:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E9=87=8D=E5=81=9A=E7=9A=84?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index a96a2a79f..8713bebf3 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -18,7 +18,8 @@ class MyshixunsController < ApplicationController # 强制重置实训 # 前段需要按照操作过程提示 def reset_my_game - unless (current_user.admin? || current_user.id == @myshixun.user_id) + course = Course.find_by(id: params[:course_id]) + unless (current_user.admin_or_business? || current_user.id == @myshixun.user_id) || (course.present? && current_user.course_identity(course) < Course::STUDENT) tip_exception("403", "") end begin