Commit 9e723ecd authored by nicolasdular's avatar nicolasdular

Load recaptcha config

For the registration controller, we were not loading the recaptcha
config correctly before rendering the page. This could lead to
issues with the recaptcha gem, where it does not get the required
keys.
parent 738e0e9e
......@@ -13,6 +13,7 @@ class RegistrationsController < Devise::RegistrationsController
before_action :whitelist_query_limiting, only: [:destroy]
before_action :ensure_terms_accepted,
if: -> { action_name == 'create' && Gitlab::CurrentSettings.current_application_settings.enforce_terms? }
before_action :load_recaptcha, only: :new
def new
if experiment_enabled?(:signup_flow)
......@@ -183,6 +184,10 @@ class RegistrationsController < Devise::RegistrationsController
stored_location_for(user) || dashboard_projects_path
end
def load_recaptcha
Gitlab::Recaptcha.load_configurations!
end
# Part of an experiment to build a new sign up flow. Will be resolved
# with https://gitlab.com/gitlab-org/growth/engineering/issues/64
def choose_layout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment