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