diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-01-25 22:37:12 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-01-25 23:09:48 +0100 |
commit | 0fb907441c827cadc767641b29d5d2c0e554f7a4 (patch) | |
tree | 1b81363e29a44a99e48c28246b572031d0d2b7db /app/models | |
parent | a9269f8786033eecf0ad307c75f5717c5ab468a2 (diff) |
Add ability to set hCaptcha either on registration form or on e-mail validation
Upshot of CAPTCHA on e-mail validation is it does not need to break the in-band registration API.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/form/admin_settings.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb index 34f14e312..7abb0d6c6 100644 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@ -40,7 +40,7 @@ class Form::AdminSettings noindex outgoing_spoilers require_invite_text - captcha_enabled + captcha_mode ).freeze BOOLEAN_KEYS = %i( @@ -59,7 +59,6 @@ class Form::AdminSettings trendable_by_default noindex require_invite_text - captcha_enabled ).freeze UPLOAD_KEYS = %i( @@ -83,6 +82,7 @@ class Form::AdminSettings validates :bootstrap_timeline_accounts, existing_username: { multiple: true } validates :show_domain_blocks, inclusion: { in: %w(disabled users all) } validates :show_domain_blocks_rationale, inclusion: { in: %w(disabled users all) } + validates :captcha_mode, inclusion: { in: %w(disabled registration-form email-confirmation) } def initialize(_attributes = {}) super |