discourse/plugins/discourse-hcaptcha/app/services/problem_check/hcaptcha_configuration.rb
2025-07-15 16:38:05 +02:00

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