diff --git a/app/controllers/tracks/concepts_controller.rb b/app/controllers/tracks/concepts_controller.rb index aeb25c37f3..6106a3dbf8 100644 --- a/app/controllers/tracks/concepts_controller.rb +++ b/app/controllers/tracks/concepts_controller.rb @@ -1,11 +1,15 @@ class Tracks::ConceptsController < ApplicationController + skip_before_action :authenticate_user!, only: %i[index show tooltip] + skip_before_action :rate_limit_for_user!, only: %i[tooltip] # Scanning over this is a lot + + before_action :cache_public_action!, only: %i[index show tooltip] + before_action :use_track before_action :use_concepts, only: :index before_action :use_concept, only: %i[show tooltip start complete] before_action :guard_practice_mode!, only: [:index] before_action :guard_course!, only: [:index] - skip_before_action :authenticate_user!, only: %i[index show tooltip] def index @concept_map_data = Track::DetermineConceptMapLayout.(@user_track) diff --git a/app/controllers/tracks/exercises_controller.rb b/app/controllers/tracks/exercises_controller.rb index b68d40624d..2b8d904f6f 100644 --- a/app/controllers/tracks/exercises_controller.rb +++ b/app/controllers/tracks/exercises_controller.rb @@ -1,14 +1,14 @@ class Tracks::ExercisesController < ApplicationController + skip_before_action :authenticate_user!, only: %i[index show tooltip] + skip_before_action :rate_limit_for_user!, only: %i[tooltip] # Scanning over this is a lot + skip_before_action :verify_authenticity_token, only: :start + include UseTrackExerciseSolutionConcern before_action :use_track! before_action :use_exercise!, only: %i[show start edit complete tooltip no_test_runner] before_action :use_solution, only: %i[show edit complete tooltip] before_action :cache_public_action!, only: %i[index show tooltip] - skip_before_action :authenticate_user!, only: %i[index show tooltip] - skip_before_action :rate_limit_for_user!, only: %i[tooltip] # Scanning over this is a lot - skip_before_action :verify_authenticity_token, only: :start - def index @num_completed = @user_track.num_completed_exercises