debian-mirror-gitlab/lib/gitlab/recaptcha.rb

21 lines
471 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
module Gitlab
module Recaptcha
def self.load_configurations!
2018-03-17 18:26:18 +05:30
if Gitlab::CurrentSettings.recaptcha_enabled
::Recaptcha.configure do |config|
2019-05-18 00:54:41 +05:30
config.site_key = Gitlab::CurrentSettings.recaptcha_site_key
config.secret_key = Gitlab::CurrentSettings.recaptcha_private_key
end
true
end
end
2017-08-17 22:00:37 +05:30
def self.enabled?
2018-03-17 18:26:18 +05:30
Gitlab::CurrentSettings.recaptcha_enabled
2017-08-17 22:00:37 +05:30
end
end
end