mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-28 02:50:14 -05:00
Disable captcha if registrations are disabled for various reasons
This commit is contained in:
parent
6a2f248fe4
commit
bf351d72af
@ -23,6 +23,8 @@ module CaptchaConcern
|
||||
end
|
||||
|
||||
def captcha_required?
|
||||
return false if ENV['OMNIAUTH_ONLY'] == 'true'
|
||||
return false unless Setting.registrations_mode != 'none' || @invite&.valid_for_use?
|
||||
captcha_enabled? && !current_user && !(@invite.present? && @invite.valid_for_use? && !@invite.max_uses.nil?) && !captcha_recently_passed?
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user