2016-01-14 18:37:52 +05:30
|
|
|
module Gitlab
|
|
|
|
module Recaptcha
|
|
|
|
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-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
def self.enabled?
|
|
|
|
current_application_settings.recaptcha_enabled
|
|
|
|
end
|
2016-01-14 18:37:52 +05:30
|
|
|
end
|
|
|
|
end
|