Merge pull request #10543 from mfo/US/fix-invite-guest

Correctif: ETQ usager, je souhaite pouvoir envoyer une invitation à un email qui n'est pas deja un usager DS
This commit is contained in:
Colin Darie 2024-06-24 10:53:16 +00:00 committed by GitHub
commit 169f07cadd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,8 @@ class InviteMailer < ApplicationMailer
layout 'mailers/layout' layout 'mailers/layout'
def invite_user(invite) def invite_user(invite)
bypass_unverified_mail_protection!
subject = "Participez à l'élaboration dun dossier" subject = "Participez à l'élaboration dun dossier"
targeted_user_link = invite.targeted_user_link || invite.create_targeted_user_link(target_context: 'invite', targeted_user_link = invite.targeted_user_link || invite.create_targeted_user_link(target_context: 'invite',
target_model: invite, target_model: invite,
@ -14,6 +16,8 @@ class InviteMailer < ApplicationMailer
end end
def invite_guest(invite) def invite_guest(invite)
bypass_unverified_mail_protection!
subject = "#{invite.email_sender} vous invite à consulter un dossier" subject = "#{invite.email_sender} vous invite à consulter un dossier"
targeted_user_link = invite.targeted_user_link || invite.create_targeted_user_link(target_context: 'invite', targeted_user_link = invite.targeted_user_link || invite.create_targeted_user_link(target_context: 'invite',
target_model: invite) target_model: invite)