diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-01-26 00:13:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-26 00:13:24 +0100 |
commit | 129bc429797452f984551b87f753222e824ec3ca (patch) | |
tree | 3b4b0bcfff51232ec9dd0d05a9a053194877ffa7 /app/helpers/admin | |
parent | e58e0eb9aa375b1107b207e8229a2142c4edc0b8 (diff) | |
parent | b7cf3941b3783220e6b3bc9a6d3975ceecdc64cb (diff) |
Merge pull request #1665 from ClearlyClaire/glitch-soc/features/hcaptcha
Add optional hCaptcha support
Diffstat (limited to 'app/helpers/admin')
-rw-r--r-- | app/helpers/admin/settings_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/admin/settings_helper.rb b/app/helpers/admin/settings_helper.rb index baf14ab25..f99a2b8c8 100644 --- a/app/helpers/admin/settings_helper.rb +++ b/app/helpers/admin/settings_helper.rb @@ -8,4 +8,8 @@ module Admin::SettingsHelper link = link_to t('admin.site_uploads.delete'), admin_site_upload_path(upload), data: { method: :delete } safe_join([hint, link], '<br/>'.html_safe) end + + def captcha_available? + ENV['HCAPTCHA_SECRET_KEY'].present? && ENV['HCAPTCHA_SITE_KEY'].present? + end end |