Change CAPTCHA handling to be only on email verification
This simplifies the implementation considerably, and while not providing ideal UX, it's the most flexible approach.
This commit is contained in:
@@ -98,7 +98,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def registrations
|
||||
Setting.registrations_mode != 'none' && !Rails.configuration.x.single_user_mode && !captcha_enabled?
|
||||
Setting.registrations_mode != 'none' && !Rails.configuration.x.single_user_mode
|
||||
end
|
||||
|
||||
def approval_required
|
||||
@@ -114,8 +114,4 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
|
||||
def captcha_enabled?
|
||||
ENV['HCAPTCHA_SECRET_KEY'].present? && ENV['HCAPTCHA_SITE_KEY'].present? && Setting.captcha_mode == 'registration-form'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user