Commit graph

265 commits

Author SHA1 Message Date
Martin
ce9dbed663 amelioration(NotificationMailer): sort la creation des commentaire sur la messagerie du mailer [trop de prob possible sinon: au retry on dupliquait les commenaitres, si le mail foirait, on commentait pas etc...] 2023-07-11 15:11:40 +02:00
Martin
23fb7e812e amelioration(a11y): utilise une balise <p> pour passer a la ligne avec un espace supplémentaire plutôt que deux <br> 2023-07-11 15:11:40 +02:00
Colin Darie
e1b21f980f
feat(sva): pending correction email mention sva/svr 2023-07-11 10:02:47 +02:00
Colin Darie
18096a709b chore(email): tag sentry mailers 2023-06-26 17:28:27 +02:00
Paul Chavard
e509ff1717 fix(dossier): do not send notifcations to deleted users 2023-06-21 09:52:38 +01:00
Martin
9b2d05b8a1 amelioration(email_event): re-lever une erreur dans un rescue_from ne la fait pas remonter. change de stratégie pour savoir si oui ou non un mail a ete envoye avec success. 2023-06-20 13:39:29 +02:00
Colin Darie
9565267170
feat(dossier): notify user by email about pending corrections 2023-06-02 16:16:13 +02:00
Martin
534ce34f87 amelioration(Dolist::ApiSender): lève une Dolist::IgnorableError afin de l'inscrire dans l'historique des EmailEvent 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
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
5526cb5173 fix(mail): limit generated subjects to 100 characters 2023-02-09 17:39:56 +01:00
Colin Darie
8a859402ad chore(mailer): setup Services Publics+ by env var so instances can have their owns 2023-02-09 10:47:53 +01:00
Colin Darie
d78c75620a chore(mailer): services publics + only for Termine "states" 2023-02-09 10:47:53 +01:00
Eric Leroy-Terquem
0e60d6bb11 clean(groupe instructeurs): remove unused method 2023-02-08 10:36:42 +01:00
Eric Leroy-Terquem
6cbc514d56 feat(groupe instructeurs): remove mailing when add instructeurs 2023-02-08 10:36:42 +01:00
Martin
1ee67d511d amelioration(mails): permet a nos mails d'inclure des balises <a> pour faciliter l'usage des mail envoyés 2023-02-06 11:01:28 +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
6615165b2e refactor(mailer): extract dolist logic into its concern 2023-01-17 14:26:11 +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
Colin Darie
01f227e1c7 fix(mailer): dolist header in devise mailer 2023-01-11 18:52:14 +01:00
Martin
3e6b82ed9e amelioration(safe_mailer): ajoute au manager la fonction pour configurer le routage des mails sur un fournisseur unique
Update app/mailers/devise_user_mailer.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>
2023-01-11 17:32:24 +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
d911bc02c0 refactor(mailer): set dolist header in DeviseUserMailer 2023-01-10 16:07:35 +01:00
Colin Darie
5ae5de0d9c refactor(email): log event when error occurs before recipients was set 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
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
Paul Chavard
f49a1baeec refactor(groupe_instructeur): remove mailer should take a list of instructeurs 2022-12-06 12:01:54 +01:00
Paul Chavard
e7766694d3 fix(messages): retry stale blobs 2022-11-02 09:19:51 +01:00
simon lehericey
097082afc9 fix(dolist): reduce message name variability 2022-10-20 15:29:56 +02:00
simon lehericey
0e75f9960b fix: send_dossier_decision preview 2022-10-06 17:43:09 +02:00
Kara Diaby
f8d4644f73 models 2022-09-02 16:23:27 +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
0063b68689 mailers: add deposit receipt to initiated_mail
See #6146
2022-05-17 10:25:13 +02:00
Paul Chavard
54b559364a feat(dossier): replace discarded with visible_by_administration 2022-03-10 14:29:40 +01:00
Kara Diaby
2eb35065f8 fix dossier deletion mailers 2022-01-25 11:46:05 +01:00
Martin
8a315a4ac1 feat(UserMailer.france_connect_merge_confirmation): in addition to distance_of_time_in_words, add exact expiration date 2021-11-25 17:34:37 +01:00
Martin
ff073f8884 Add confirmation by email when merging DC/FC accounts
feat(fci.confirmation_code): add confirmation code to france_connect_informations

feat(user_mailer.france_connect_confirmation_code): add confirmation by email mail method/preview/spec, pointing to merge_mail_with_existing_account (reuse existing method)

feat(mail_merge): mail merge

feat(merge.cannot_use_france_connect): same behaviour as callback

clean(fci.confirmation_code): use same token for mail validation as merge

feat(resend_france_connect/particulier/merge_confirmation): resend email with link. also enhance some trads, cleanup halfy finished refacto

clean(tech): finalize story by plugging merge_with_new_account to email validation

fix(deadspec): was removed

fix(spec): broken after last refactoring

lint(rubocop): space before parenthesis

lint(haml-lint): yoohoooo space before =

fix(lint): scss now :D

Update app/assets/stylesheets/buttons.scss

cleanup

feat(france_connect): re-add confirm by email, with an option for confirmation by email instead of only confirmation by email

fixup! Add confirmation by email when merging DC/FC accounts

fix(lint): haml_spec failure
2021-11-25 17:34:34 +01:00