学生重做的权限调整

courseware
cxt 5 years ago
parent 8aff7ed583
commit 7a28b31a46

@ -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

Loading…
Cancel
Save