mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 03:18:54 +08:00
17 lines
385 B
Ruby
Vendored
17 lines
385 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
class ProblemCheck::HcaptchaConfiguration < ProblemCheck
|
|
self.priority = "high"
|
|
|
|
def call
|
|
return problem if SiteSetting.discourse_hcaptcha_enabled && !hcaptcha_credentias_present?
|
|
|
|
no_problem
|
|
end
|
|
|
|
private
|
|
|
|
def hcaptcha_credentias_present?
|
|
SiteSetting.hcaptcha_site_key.present? && SiteSetting.hcaptcha_secret_key.present?
|
|
end
|
|
end
|