Commit graph

91 commits

Author SHA1 Message Date
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
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
Eric Leroy-Terquem
22089efa12 test(groupe instructeurs): add test and preview when removing instructeurs 2023-02-08 10:36:42 +01:00
Colin Darie
380a4232c6 fix(mailer): preview for DossierMailer#notify_new_draft 2023-02-02 15:58:53 +01:00
Colin Darie
784b0458fe feat(dolist): consolidate dispatched events with delivered emails 2023-01-18 09:56:40 +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
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
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
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
Pierre de La Morinerie
17c83b1ce2 mailer: fix notify_new_answer mailer preview 2022-02-16 18:26:45 +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
simon lehericey
b160086cc5 update update_email to allow merge 2021-11-04 16:10:09 +01:00
Paul Chavard
4850c3b02d fix(i18n): enable locale for email previews 2021-09-09 13:06:51 -05:00
Paul Chavard
d6cbdf2a48 feat(dossier): add dossier transfer models 2021-09-08 14:39:46 +02:00
Paul Chavard
f6508899de Refactor NotificationMailer 2021-05-04 12:05:06 +02:00
kara Diaby
198e3ed3b8 expert mailer instead of avis mailer 2021-04-15 12:22:40 +02:00
kara Diaby
f4aa29a799 add expert mailer preview 2021-04-15 11:29:55 +02:00
Pierre de La Morinerie
3b5617b123 mailers: remove dead AdministrationMailer code 2021-02-04 12:15:13 +01:00
kara Diaby
00b5ad7a10 EQT instructeur, je peux supprimer un dossier terminé 2020-12-16 15:00:26 +01:00
Pierre de La Morinerie
43569f687e specs: use fixture_file_upload rather than Rack::Test::UploadedFile
This is mostly for consistency (both styles were used before).

Note: we still have to use `Rack::Test::UploadedFile.new` in factories,
because of https://github.com/thoughtbot/factory_bot/issues/385.
2020-07-01 11:13:45 +02:00
Paul Chavard
210389d0f8 Remove admin creation notification email 2020-06-25 16:29:06 +02:00
Paul Chavard
f1b531911b Handle processed dossiers in deletion mailers 2020-04-22 15:39:10 +02:00
Paul Chavard
7ba4c513e6 Refactor notify near deletion mailers 2020-04-01 17:40:52 +02:00
maatinito
1af32b29fd #4807 Use now() instead of Date.time.today (better code homogeneity) 2020-03-24 17:09:14 -10:00
maatinito
f5c2dc03c5 #4807 better method/variable naming 2020-03-24 16:46:23 -10:00
Christian Lautier
e61c53f267 Fix #4807 48h before closing a procedure, notify users their draft is not submitted 2020-03-24 16:46:23 -10:00
Paul Chavard
cd0acb1344 Cleanup dossier mailers 2020-03-19 16:52:18 +01:00
simon lehericey
3e7cef63c6 add mailer preview 2020-03-18 15:25:02 +01:00
Pierre de La Morinerie
6664965961 mailers: add procedure context to the confirmation link
This allows to redirect the user to the procedure they signed up for
even when the browser session is not available (like if they changed
of browser).

Fix #4738
2020-02-25 11:45:36 +00:00
Paul Chavard
b7051da278 Remove old export code 2020-02-19 18:19:17 +01:00
Pierre de La Morinerie
e746d90016 mailers: add a link to the procedure when the account already exists 2020-02-12 13:24:52 +00:00
Christophe Robillard
ed970d3f3c admin: create without providing email 2020-02-04 16:21:42 +01:00
simon lehericey
006e426a11 Work on deletion mail 2019-12-03 17:18:53 +01:00
simon lehericey
6391f7ff9c Work on notify_near_deletion mailer 2019-12-03 17:18:53 +01:00
simon lehericey
8a42b9f97a Add groupe instructeur mailer preview 2019-11-18 17:08:51 +01:00
simon lehericey
e3d7688e66 [fix #4473] Invite_administrateur!: do not reset password if the user is active 2019-11-05 10:29:39 +01:00