summaryrefslogtreecommitdiff
path: root/lib/gitlab/recaptcha.rb
blob: 4bc76ea033fede0134d9b0f8a95d75e83050364f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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

    def self.enabled?
      current_application_settings.recaptcha_enabled
    end
  end
end