Module: Gitlab::Recaptcha
- Extended by:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/recaptcha.rb
Class Method Summary collapse
Class Method Details
.enabled? ⇒ Boolean
18 19 20 |
# File 'lib/gitlab/recaptcha.rb', line 18 def self.enabled? Gitlab::CurrentSettings.recaptcha_enabled end |
.enabled_on_login? ⇒ Boolean
22 23 24 |
# File 'lib/gitlab/recaptcha.rb', line 22 def self.enabled_on_login? Gitlab::CurrentSettings.login_recaptcha_protection_enabled end |
.load_configurations! ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/gitlab/recaptcha.rb', line 7 def self.load_configurations! if enabled? || enabled_on_login? ::Recaptcha.configure do |config| config.site_key = Gitlab::CurrentSettings.recaptcha_site_key config.secret_key = Gitlab::CurrentSettings.recaptcha_private_key end true end end |