0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00

Don't attempt to save submissions if the user can't access the wizard

Dieser Commit ist enthalten in:
angusmcleod 2021-06-16 14:13:12 +10:00
Ursprung 58b3bc13c9
Commit 9452907f0a

Datei anzeigen

@ -61,7 +61,7 @@ class CustomWizard::WizardController < ::ApplicationController
result = success_json result = success_json
user = current_user user = current_user
if user if user && wizard.can_access?
submission = wizard.current_submission submission = wizard.current_submission
if submission && submission['redirect_to'] if submission && submission['redirect_to']
result.merge!(redirect_to: submission['redirect_to']) result.merge!(redirect_to: submission['redirect_to'])