Welcome to mirror list, hosted at ThFree Co, Russian Federation.

recaptcha_helper.rb « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b6b75d03b2ee562abbf26b57815374fcd18b5281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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