summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-29 09:39:54 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-29 09:39:54 +0000
commit58bc4b72d519d971be7c3eb80f174d9e22f2a1b2 (patch)
tree7db245ca3f7b844afa46ef1286dfc8d14a50ba6b /lib
parentf0ecd69be598eaaeb59f9edded378ebd9b2d68ae (diff)
parente619d0b615a394a08ca1d0be59f0028c8e390b88 (diff)
downloadgitlab-ce-58bc4b72d519d971be7c3eb80f174d9e22f2a1b2.tar.gz
Merge branch 'feature/recaptcha_settings' into 'master'
Makes reCAPTCHA configurable through Application Settings screen Following the work made by @stanhu here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2216, made it configurable without needing to restart Gitlab See merge request !2231
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/recaptcha.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/recaptcha.rb b/lib/gitlab/recaptcha.rb
new file mode 100644
index 00000000000..70e7f25d518
--- /dev/null
+++ b/lib/gitlab/recaptcha.rb
@@ -0,0 +1,14 @@
+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
+ end
+end