2015-12-28 15:21:34 -05:00
|
|
|
module Gitlab
|
|
|
|
module Recaptcha
|
2017-08-31 05:47:03 -04:00
|
|
|
extend Gitlab::CurrentSettings
|
|
|
|
|
2015-12-28 15:21:34 -05:00
|
|
|
def self.load_configurations!
|
|
|
|
if current_application_settings.recaptcha_enabled
|
|
|
|
::Recaptcha.configure do |config|
|
|
|
|
config.public_key = current_application_settings.recaptcha_site_key
|
|
|
|
config.private_key = current_application_settings.recaptcha_private_key
|
|
|
|
end
|
|
|
|
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
2017-01-27 11:25:39 -05:00
|
|
|
|
|
|
|
def self.enabled?
|
|
|
|
current_application_settings.recaptcha_enabled
|
|
|
|
end
|
2015-12-28 15:21:34 -05:00
|
|
|
end
|
|
|
|
end
|