debian-mirror-gitlab/app/helpers/recaptcha_helper.rb
2023-01-12 18:35:48 +00:00

18 lines
415 B
Ruby

# frozen_string_literal: true
module RecaptchaHelper
def recaptcha_enabled?
return false if Gitlab::Qa.request?(request.user_agent)
!!Gitlab::Recaptcha.enabled?
end
alias_method :show_recaptcha_sign_up?, :recaptcha_enabled?
def recaptcha_enabled_on_login?
return false if Gitlab::Qa.request?(request.user_agent)
Gitlab::Recaptcha.enabled_on_login?
end
end
RecaptchaHelper.prepend_mod