Commit graph

14 commits

Author SHA1 Message Date
Colin Darie
8358fec884
fix(prefill): don't create Individual for non-individual procedures
Closes #9486
2023-09-18 16:45:02 +02:00
simon lehericey
4cbb8e91f2 Workable draft prefill identity (no link or query help) 2023-09-07 10:17:19 +02:00
Paul Chavard
c1afc985e4 fix(prefill): allow private annotations prefill 2023-06-15 10:07:25 +01:00
Damien Le Thiec
ca29079c27 Fix rubocop 2023-02-22 19:40:52 +01:00
Damien Le Thiec
fbe4fe251a Fix format prefill repetition 2023-02-22 19:32:25 +01:00
Damien Le Thiec
63e7c17fda First tests for prefill repetition 2023-02-03 12:14:18 +01:00
Damien Le Thiec
20ba96ba3c POST working with prefill query example for repeating fields 2023-01-31 14:54:23 +01:00
Damien Le Thiec
81df033282 First draft repeatable 2023-01-26 17:57:57 +01:00
Sébastien Carceles
0046338e6a
fix(prefill): don't mark the dossier as prefilled when it's not (#8464)
A dossier should not be marked as prefilled when it's not, meaning
when no prefill params are given.
2023-01-19 10:51:56 +00: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
0b10c73bcf feat(prefill): allow to prefill private annotations 2022-12-26 22:14:17 +00:00
Sébastien Carceles
9dfb498806 review: prefer if to unless
Co-authored-by: LeSim <mail@simon.lehericey.net>
2022-12-08 15:27:39 +01:00
sebastiencarceles
373e8aeadb review: validate prefilled champs only 2022-12-08 15:27:39 +01:00
sebastiencarceles
ab30af5fe5 review: move Prefillable to concern directory 2022-12-08 15:27:39 +01:00
Renamed from app/models/dossier/prefillable.rb (Browse further)