demarches-normaliennes/app/mailers
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
..
.keep First Commit 2015-08-10 11:05:06 +02:00
administrateur_mailer.rb feat(manager#outdated_procedure): allow super admin to enable procedure_expires_when_termine_enabled for old procedure 2022-08-24 13:10:48 +02:00
administration_mailer.rb remove warning mail for dubious procedures 2022-05-25 14:44:53 +02:00
application_mailer.rb fix(dolist): reduce message name variability 2022-10-20 15:29:56 +02:00
avis_mailer.rb fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation 2022-06-14 08:41:09 +02:00
devise_user_mailer.rb feat(demarche): create and prefill a dossier with POST request (#8233) 2023-01-03 14:46:10 +01:00
dossier_mailer.rb fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
expert_mailer.rb fix: send_dossier_decision preview 2022-10-06 17:43:09 +02:00
groupe_instructeur_mailer.rb refactor(groupe_instructeur): remove mailer should take a list of instructeurs 2022-12-06 12:01:54 +01:00
instructeur_mailer.rb feat(Administrateur::ArchivesControllers): add archives #index and #create for admin 2022-07-04 14:18:46 +02:00
invite_mailer.rb feat(invite): wrap invitation with targeted_user_links 2022-06-17 16:44:37 +02:00
notification_mailer.rb fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
preactivate_users_mailer.rb ajout du nom d'application dans les mailers 2020-07-23 16:17:52 +02:00
resend_attestation_mailer.rb Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
user_mailer.rb feat(Administrateur::ArchivesControllers): add archives #index and #create for admin 2022-07-04 14:18:46 +02:00