BigW Consortium Gitlab

recaptcha.rb 500 Bytes
Newer Older
1 2
module Gitlab
  module Recaptcha
3 4
    extend Gitlab::CurrentSettings

5 6 7 8 9 10 11 12 13 14
    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
15 16 17 18

    def self.enabled?
      current_application_settings.recaptcha_enabled
    end
19 20
  end
end