diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-08-25 04:31:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 04:31:10 +0200 |
commit | 03241d884eb93c59695b4bad98c1725bdc544824 (patch) | |
tree | af59b537b62580f7001f02d03ace2e77b5398c38 /app | |
parent | ba745ca99a4ce4b953e11776827aabb68d621e79 (diff) |
Add option for EMAIL_DOMAIN_DENYLIST/EMAIL_DOMAIN_ALLOWLIST to apply after confirmation (#18642)
Fixes #18620
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 60abaf77e..9833300cd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -94,7 +94,7 @@ class User < ApplicationRecord validates :invite_request, presence: true, on: :create, if: :invite_text_required? validates :locale, inclusion: I18n.available_locales.map(&:to_s), if: :locale? - validates_with BlacklistedEmailValidator, if: -> { !confirmed? } + validates_with BlacklistedEmailValidator, if: -> { ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed? } validates_with EmailMxValidator, if: :validate_email_dns? validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create |