0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00
discourse-custom-wizard/extensions/extra_locales_controller.rb

11 Zeilen
383 B
Ruby

module ExtraLocalesControllerCustomWizard
private def valid_bundle?(bundle)
super || begin
return false unless bundle =~ /wizard/ && request.referer =~ /\/w\//
path = URI(request.referer).path
wizard_id = path.split('/w/').last
wizard = CustomWizard::Wizard.create(wizard_id.underscore, current_user)
wizard && wizard.can_access?
end
end
end