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]