Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-12-02 05:21:10 +01:00
11 Zeilen
Kein EOL
383 B
Ruby
11 Zeilen
Kein EOL
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 |