feat(User): always allow reset_password_instructions
This commit is contained in:
parent
7c514e3585
commit
819fa2cde2
2 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,12 @@ class DeviseUserMailer < Devise::Mailer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reset_password_instructions(record, token, opts = {})
|
||||||
|
bypass_unverified_mail_protection!
|
||||||
|
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
def self.critical_email?(action_name)
|
def self.critical_email?(action_name)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
|
@ -73,6 +73,7 @@ RSpec.describe DeviseUserMailer, type: :mailer do
|
||||||
it "respect preferred domain" do
|
it "respect preferred domain" do
|
||||||
expect(header_value("From", subject.message)).to include(CONTACT_EMAIL)
|
expect(header_value("From", subject.message)).to include(CONTACT_EMAIL)
|
||||||
expect(subject.message.to_s).to include("#{ENV.fetch("APP_HOST_LEGACY")}/users/password")
|
expect(subject.message.to_s).to include("#{ENV.fetch("APP_HOST_LEGACY")}/users/password")
|
||||||
|
expect(subject[BalancerDeliveryMethod::BYPASS_UNVERIFIED_MAIL_PROTECTION]).to be_present
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue