summaryrefslogtreecommitdiff
path: root/lib/gitlab/recaptcha.rb
blob: c9efa28d7e7064ad679661cde30e539110627485 (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 Gitlab::CurrentSettings.recaptcha_enabled
        ::Recaptcha.configure do |config|
          config.public_key  = Gitlab::CurrentSettings.recaptcha_site_key
          config.private_key = Gitlab::CurrentSettings.recaptcha_private_key
        end

        true
      end
    end

    def self.enabled?
      Gitlab::CurrentSettings.recaptcha_enabled
    end
  end
end