demarches-normaliennes/config
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
..
custom_locales feat(footer): customize using custom views & locales 2022-03-10 17:31:20 +01:00
environments remove feature flag zonage 2022-12-21 09:02:16 +01:00
initializers refactor(env): remove useless DOSSIER_DEPOSIT_RECEIPT_LOGO_SRC var 2022-12-22 19:44:57 +01:00
locales feat(demarche): create and prefill a dossier with POST request (#8233) 2023-01-03 14:46:10 +01:00
application.rb remove feature flag zonage 2022-12-21 09:02:16 +01:00
boot.rb app: enable Bootsnap 2021-03-19 08:05:14 +01:00
brakeman.ignore refactor(export): reduce repetition in export code hopefully making it more readable 2022-11-16 08:49:37 +01:00
cable.yml app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
database.yml config: fix spring randomly crashing in the pg gem 2020-05-25 09:23:41 +00:00
deploy.rb Use the same env vars for setup and deploy 2022-04-08 10:45:44 +02:00
env.example add dolist saml config 2022-08-23 15:05:20 +02:00
env.example.optional refactor(env): remove useless DOSSIER_DEPOSIT_RECEIPT_LOGO_SRC var 2022-12-22 19:44:57 +01:00
environment.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
i18n-tasks.yml feat(instructeur/procedure#index): enhance filter to support processed_at and state [plus en_instruction_at/since] 2022-09-27 17:19:54 +02:00
puma.rb config: remove pre and post boot code from puma config 2021-10-25 11:28:09 +02:00
routes.rb feat(demarche): create and prefill a dossier with POST request (#8233) 2023-01-03 14:46:10 +01:00
secrets.yml feat(timestamp): add certigna 2022-12-07 19:28:01 +01:00
skylight.yml [ENV] Add skylight conf 2018-08-23 15:55:31 +02:00
spring.rb Rails app:update 2020-07-07 18:03:56 +02:00
storage.yml feat(openstack): just use FOG_OPENSTACK_URL 2022-02-09 13:02:43 +01:00
vite.json chore(build): use vitejs 2022-06-23 15:22:54 +02:00
zones.yml makes the NA label for zone more explicit 2022-09-26 16:58:53 +02:00