Commit graph

219 commits

Author SHA1 Message Date
Martin
8fa2bbb67d amelioration(dolist): ne log erreurs pas les erreurs dans sentry lorsque le contact chez dolist est injoingable ou hardbounce 2023-04-19 11:22:13 +02:00
Lisa Durand
e1260a3df8 fix wrong encoding of special character in email notification subject 2023-03-31 16:58:41 +02:00
simon lehericey
ca63cc34ab feat(token depreciation): add mail alert 2023-03-16 16:16:45 +01:00
Eric Leroy-Terquem
f6c4986e86 feat(groupe instructeur mailer): do not notify group when instructeurs removed 2023-03-02 09:46:58 +01:00
Eric Leroy-Terquem
343cb5fce6 feat(groupe instructeur mailer): add emailing to added instructeurs 2023-02-20 15:41:19 +01:00
Eric Leroy-Terquem
4926fbff19 fix(groupe instructeur mailer): fix mailers preview 2023-02-16 10:37:04 +01:00
Eric Leroy-Terquem
a46faf8cdf feat(groupe instructeur mailer): make two kind of notifications for removed instructeur 2023-02-16 10:37:04 +01:00
Eric Leroy-Terquem
5be58c8223 refactor(groupe instructeur mailer): rename mailer methods 2023-02-16 10:37:04 +01:00
Eric Leroy-Terquem
cbf072961c feat(groupe instructeur mailer): add emailing to removed instructeurs 2023-02-16 10:37:04 +01:00
Colin Darie
aeb602a63d fix(mail): default subject fallback when subject template is empty
Closes #8448
2023-02-09 17:49:43 +01:00
Colin Darie
5526cb5173 fix(mail): limit generated subjects to 100 characters 2023-02-09 17:39:56 +01:00
Eric Leroy-Terquem
22089efa12 test(groupe instructeurs): add test and preview when removing instructeurs 2023-02-08 10:36:42 +01:00
Martin
6a25120f80 amelioration(dolist_api): echoue avec un fail pour remonter dans notre gestion des retry 2023-02-03 17:19:36 +01:00
Martin
2de9026c13 amelioration(dolist_api): forward le message_id afin de faciliter les investigations 2023-02-03 17:19:36 +01:00
Colin Darie
380a4232c6 fix(mailer): preview for DossierMailer#notify_new_draft 2023-02-02 15:58:53 +01:00
Martin
4f4791a864 bug(liens-invitation): ne devrait pas pointer sur l'avis ayant le même id que l'invitation 2023-01-31 16:33:31 +01:00
Martin
4990c448b1 amelioration(mail.prioritaire): en plus des mails de device, ajoute la gestion du routage des autres mails critique 2023-01-24 11:49:53 +01:00
Colin Darie
784b0458fe feat(dolist): consolidate dispatched events with delivered emails 2023-01-18 09:56:40 +01:00
Colin Darie
ce7e674159 feat(mailer): make errors interceptable by jobs so they will retry
Comme on intercepte chaque `StandardError` pour le monitoring des mails
en erreur, l'erreur n'était plus visible par le job, et les emails
étaient perdus.

A la place on re-raise une autre erreur pour que le job échoue afin de
retry plus tard. Pour ne pas être "avalée" par le rescue_from,
cette erreur doit héritée d'`Exception` plutôt que `StandardError`.

NB: il faudrait parvenir à écrire un test pour vérifier ce comportement.

Pour être vérifié en dev, il faut activer `raise_delivery_errors`
comme en production.
2023-01-17 14:26:11 +01:00
Martin
d535735155 amelioration(devise_mailer): oriente les mails de devise vers un fournisseur quand cela est configuré 2023-01-11 17:13:05 +01:00
Colin Darie
d58e6a2f9c refactor(email): remove pseudonymization, it will be done at dump-time 2023-01-10 16:07:35 +01:00
Colin Darie
b9c1799e60 refactor(mailer): shared error concern 2023-01-10 16:07:35 +01:00
Colin Darie
0a22c1d2f0 chore(email): log smtp errors 2023-01-10 16:07:35 +01:00
Colin Darie
6cb2389eef chore(email): add an observer which log the emails dispatched 2023-01-10 16:07:35 +01:00
Colin Darie
0b033a7025 refactor(email): improve wording of automatic deletion to user
Closes #7688
2023-01-04 13:15:10 +01:00
Colin Darie
7d16ae83e8 refactor(email): improve wording of near deletion to user
Closes #7688
2023-01-04 13:15:10 +01:00
Sébastien Carceles
20136b7ac8
feat(demarche): create and prefill a dossier with POST request (#8233)
* add base controller for public api

* add dossiers controller with basic checks

* create the dossier

* ensure content-type is json

* prefill dossier with given values

* mark a dossier as prefilled

When a dossier is prefilled, it's allowed not to have a user.

Plus, we add a secure token to the dossier, which we will need later to set a
user after sign in / sign up.

* set user as owner of an orphan prefilled dossier

When a visitor comes from the dossier_url answered by the public api,
the dossier is orphan:
- when the user is already authenticated: they become the owner
- when the user is not authenticated: they can sign in / sign up / france_connect
and then they become the owner

So here is the procedure:
- allow to sign in / sign up / france connect when user is unauthenticated
- set dossier ownership when the dossier is orphan
- check dossier ownership when the dossier is not
- redirect to brouillon path when user is signed in and owner

* mark the dossier as prefilled when it's prefilled
(even with a GET request, because it will be useful later on, for
exmample in order to cleanup the unused prefilled dossiers)

* system spec: prefilling dossier with post request
2023-01-03 14:46:10 +01:00
Paul Chavard
4a4ce67ef6 fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
simon lehericey
fcfe09f05a refactor(user): rename delete_and_keep_track_dossiers 2022-11-16 17:52:47 +01:00
simon lehericey
ba805a7436 fix: invite_mailer previews 2022-10-06 17:43:09 +02:00
simon lehericey
6cba489a54 fix: send_notifications preview 2022-10-06 17:43:09 +02:00
simon lehericey
878958b23b fix: invite_instructeur preview 2022-10-06 17:43:09 +02:00
simon lehericey
b9ef8c5001 fix: add_instructeur preview 2022-10-06 17:43:09 +02:00
simon lehericey
0e75f9960b fix: send_dossier_decision preview 2022-10-06 17:43:09 +02:00
simon lehericey
ab0392fb36 fix: avis_mailer preview 2022-10-06 17:43:09 +02:00
simon lehericey
6812b35a3d chore: remove dead code 2022-10-06 17:43:09 +02:00
simon lehericey
6841e80414 fix: administrateur_mailer preview 2022-10-06 17:43:09 +02:00
Martin
2f5528398f feat(manager#outdated_procedure): allow super admin to enable procedure_expires_when_termine_enabled for old procedure
revew(typo): various typo, tx christophe :-)

fix(spec): due to typo fixes
2022-08-24 13:10:48 +02:00
Martin
7fb85c97cb feat(Administrateur::ArchivesControllers): add archives #index and #create for admin 2022-07-04 14:18:46 +02:00
Martin
274b5eab2e feat(invite): wrap invitation with targeted_user_links 2022-06-17 16:44:37 +02:00
Martin
8b487c847b fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation 2022-06-14 08:41:09 +02:00
Martin
cb890343ff feat(targeted_user_link): add targeted user link to wrap expert invitation in order to avoid access issue when the expert is connected with another account
feat(user.merge): ensure to merge user.targeted_user_link

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

feat(db/create_targeted_user_links): ensure not null with fk
2022-05-31 14:50:31 +02:00
Christophe Robillard
f14cd7b022 remove warning mail for dubious procedures 2022-05-25 14:44:53 +02:00
Pierre de La Morinerie
4fcb85fd65 app: remove procedure_dossier_papertrail feature flag
The feature is now enabled for all procedures.
2022-05-24 17:32:11 +02:00
Pierre de La Morinerie
0063b68689 mailers: add deposit receipt to initiated_mail
See #6146
2022-05-17 10:25:13 +02:00
Pierre de La Morinerie
e8b6731af8 spec: improve performances of notification_mailer_preview
The time to find the last dossier could be very long for large
procedures.
2022-05-17 10:25:13 +02:00
Paul Chavard
51d7fd6190 test(dossier): update spec to use visible_by_administration 2022-03-10 14:29:40 +01:00
Pierre de La Morinerie
c9f1a2b8ea mailer: improve notify_new_answer wording
And also insert the reply email address directly in the email body.
2022-02-16 18:35:30 +01:00
Pierre de La Morinerie
17c83b1ce2 mailer: fix notify_new_answer mailer preview 2022-02-16 18:26:45 +01:00
Kara Diaby
c9f402aa5b tests 2022-01-25 11:46:05 +01:00