debian-mirror-gitlab/app/helpers/recaptcha_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
415 B
Ruby
Raw Normal View History

2021-01-29 00:20:46 +05:30
# frozen_string_literal: true
module RecaptchaHelper
2021-12-11 22:18:48 +05:30
def recaptcha_enabled?
2023-01-13 00:05:48 +05:30
return false if Gitlab::Qa.request?(request.user_agent)
2022-11-25 23:54:43 +05:30
2021-01-29 00:20:46 +05:30
!!Gitlab::Recaptcha.enabled?
end
2021-12-11 22:18:48 +05:30
alias_method :show_recaptcha_sign_up?, :recaptcha_enabled?
2022-11-25 23:54:43 +05:30
def recaptcha_enabled_on_login?
2023-01-13 00:05:48 +05:30
return false if Gitlab::Qa.request?(request.user_agent)
2022-11-25 23:54:43 +05:30
Gitlab::Recaptcha.enabled_on_login?
end
2021-01-29 00:20:46 +05:30
end
2021-11-11 11:23:49 +05:30
RecaptchaHelper.prepend_mod