diff --git a/assets/javascripts/discourse/components/custom-wizard-no-access.js.es6 b/assets/javascripts/discourse/components/custom-wizard-no-access.js.es6 index b814f0c8..b3b2e26c 100644 --- a/assets/javascripts/discourse/components/custom-wizard-no-access.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-no-access.js.es6 @@ -2,6 +2,7 @@ import CustomWizard from "../models/custom-wizard"; import discourseComputed from "discourse-common/utils/decorators"; import Component from "@ember/component"; import { dasherize } from "@ember/string"; +import getURL from "discourse-common/lib/get-url"; export default Component.extend({ classNameBindings: [":wizard-no-access", "reasonClass"], @@ -18,7 +19,11 @@ export default Component.extend({ actions: { skip() { - CustomWizard.skip(this.get("wizardId")); + if (this.currentUser) { + CustomWizard.skip(this.get("wizardId")); + } else { + window.location = getURL("/"); + } }, }, }); diff --git a/plugin.rb b/plugin.rb index e17673c2..4a41d915 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 1.22.7 +# version: 1.22.8 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech