From 760c67bb6fe9f5147454d105969988d435b34e1f Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 3 Nov 2017 16:50:01 +0800 Subject: [PATCH] Prevent guests from accessing custom wizards --- controllers/wizard.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/wizard.rb b/controllers/wizard.rb index fc8cf4bd..4785e19f 100644 --- a/controllers/wizard.rb +++ b/controllers/wizard.rb @@ -1,6 +1,10 @@ class CustomWizard::WizardController < ::ApplicationController prepend_view_path(Rails.root.join('plugins', 'discourse-custom-wizard', 'views')) layout 'wizard' + + skip_before_action :check_xhr, :preload_json + + before_action :ensure_logged_in helper_method :wizard_page_title def wizard_page_title