From f0f091f4760df78e9881bb61bc69052898191b3d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 10 Aug 2019 10:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E5=A4=A7=E4=B8=BB=E4=B8=9A=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=99=BB=E5=BD=95=E5=B0=B1=E8=83=BD=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- app/controllers/shixuns_controller.rb | 2 +- app/controllers/stages_controller.rb | 2 +- app/controllers/subjects_controller.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 74352724c..ebce98b62 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -1,5 +1,5 @@ class ChallengesController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login, :check_auth, except: [:index] before_action :find_shixun, only: [:new, :create, :index] skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer] before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up, diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 3145636df..58dc355cc 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -2,7 +2,7 @@ class ShixunsController < ApplicationController include ShixunsHelper include ApplicationHelper - before_action :require_login, :check_auth, except: [:download_file, :index, :menus] + before_action :require_login, :check_auth, except: [:download_file, :index, :menus, :show, :show_right] before_action :check_account, only: [:new, :create, :shixun_exec] diff --git a/app/controllers/stages_controller.rb b/app/controllers/stages_controller.rb index 3967554aa..acf0e4829 100644 --- a/app/controllers/stages_controller.rb +++ b/app/controllers/stages_controller.rb @@ -1,5 +1,5 @@ class StagesController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login, :check_auth, except: [:index] before_action :find_subject, only: [:create, :index] before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position] before_action :allowed, except: [:index] diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 396c0900e..c35397684 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -1,5 +1,5 @@ class SubjectsController < ApplicationController - before_action :require_login, :check_auth, except: [:index] + before_action :require_login, :check_auth, except: [:index, :show] # before_action :check_auth, except: [:index] before_action :check_account, only: [:new, :create] before_action :find_subject, except: [:index, :create, :new, :append_to_stage]