BigW Consortium Gitlab

recaptcha.rb 444 Bytes
Newer Older
1 2 3
module Gitlab
  module Recaptcha
    def self.load_configurations!
4
      if Gitlab::CurrentSettings.recaptcha_enabled
5
        ::Recaptcha.configure do |config|
6 7
          config.public_key  = Gitlab::CurrentSettings.recaptcha_site_key
          config.private_key = Gitlab::CurrentSettings.recaptcha_private_key
8 9 10 11 12
        end

        true
      end
    end
13 14

    def self.enabled?
15
      Gitlab::CurrentSettings.recaptcha_enabled
16
    end
17 18
  end
end