From 6cf53047c35635351ec2f495cc3262b1858d044e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 29 Jun 2019 15:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 41ba59be8..d56c3ecbd 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -138,7 +138,7 @@ class ChallengesController < ApplicationController # tab 0,nil 过关任务, 1 评测设置, 2 参考答案 def edit @tab = params[:tab].to_i - @power = current_user.manager_of_shixun?(@shixun) && @shixun.status == 0 + @power = @shixun.status == 0 challenge_num = Challenge.where(:shixun_id => @shixun).count @position = @challenge.position @chooses = @challenge.challenge_chooses @@ -279,9 +279,6 @@ class ChallengesController < ApplicationController def find_shixun @shixun = Shixun.find_by_identifier(params[:shixun_identifier]) - if !current_user.shixun_permission(@shixun) - tip_exception(403, "..") - end end # 通用接口