demarches-normaliennes/spec/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
..
previews feat(demarche): create and prefill a dossier with POST request (#8233) 2023-01-03 14:46:10 +01:00
administrateur_mailer_spec.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_spec.rb remove warning mail for dubious procedures 2022-05-25 14:44:53 +02:00
application_mailer_spec.rb fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
avis_mailer_spec.rb fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation 2022-06-14 08:41:09 +02:00
dossier_mailer_spec.rb fix(dossier): explicitly send draft notification email 2022-12-26 22:02:33 +00:00
groupe_instructeur_mailer_spec.rb Routing: send emails to the right group 2019-12-16 17:47:08 +01:00
instructeur_mailer_spec.rb Remove old export code 2020-02-19 18:19:17 +01:00
invite_mailer_spec.rb feat(invite): wrap invitation with targeted_user_links 2022-06-17 16:44:37 +02:00
notification_mailer_spec.rb refactor(user): rename delete_and_keep_track_dossiers 2022-11-16 17:52:47 +01:00
user_mailer_spec.rb feat(Administrateur::ArchivesControllers): add archives #index and #create for admin 2022-07-04 14:18:46 +02:00