2016-01-14 18:37:52 +05:30
|
|
|
module Gitlab
|
|
|
|
module Recaptcha
|
|
|
|
def self.load_configurations!
|
2018-03-17 18:26:18 +05:30
|
|
|
if Gitlab::CurrentSettings.recaptcha_enabled
|
2016-01-14 18:37:52 +05:30
|
|
|
::Recaptcha.configure do |config|
|
2018-03-17 18:26:18 +05:30
|
|
|
config.public_key = Gitlab::CurrentSettings.recaptcha_site_key
|
|
|
|
config.private_key = Gitlab::CurrentSettings.recaptcha_private_key
|
2016-01-14 18:37:52 +05:30
|
|
|
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
|
2016-01-14 18:37:52 +05:30
|
|
|
end
|
|
|
|
end
|