diff options
Diffstat (limited to 'app/controllers/confirmations_controller.rb')
-rw-r--r-- | app/controllers/confirmations_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index 0b833e149a4..6725e19df25 100644 --- a/app/controllers/confirmations_controller.rb +++ b/app/controllers/confirmations_controller.rb @@ -2,6 +2,10 @@ class ConfirmationsController < Devise::ConfirmationsController include AcceptsPendingInvitations + include GitlabRecaptcha + + prepend_before_action :check_recaptcha, only: :create + before_action :load_recaptcha, only: :new feature_category :users @@ -31,6 +35,12 @@ class ConfirmationsController < Devise::ConfirmationsController end end + def check_recaptcha + return unless resource_params[:email].present? + + super + end + def after_sign_in(resource) after_sign_in_path_for(resource) end |