Pierre de La Morinerie
8dce7d59ed
js: redirect to sign-in when a ujs link_to receives a 401
...
Before, when a 401 was received by a ujs-enabled link (like `link_to …,
method: :delete, data: { remote: true }`, rails-ujs tried to insert the
response text as a Javascript script.
As the script was something like `Please sign-in`, which is not valid
Javascript, the browser would throw an "Unexpected token" error.
The typical use-case is:
1. The user open a form in a tab,
2. The user disconnects in another tab,
3. In the first tab, the user clicks on a remote "Delete" link_to
In that case the browser raised an error in the console (and in Sentry),
but the user would see nothing.
With this commit, all 401 ujs errors are turned into redirects to the
sign-in page.
Fix https://sentry.io/organizations/demarches-simplifiees/issues/2522512693/activity/
2021-09-07 16:45:52 -05:00
Pierre de La Morinerie
1f7c4422b5
js: update Sentry SDK to the latest version
2021-09-07 16:45:52 -05:00
Pierre de La Morinerie
255c00c174
js: ignore a new variant of the same warning
2021-09-07 16:45:52 -05:00
Pierre de La Morinerie
45845b6233
Merge pull request #6452 from betagouv/main
2021-09-07 11:20:56 -05:00
Paul Chavard
d553920fdc
Merge pull request #6451 from betagouv/fix-dossier-pdf-generation
...
Correction de la génération PDF de dossiers comportant des champs "Pays"
2021-09-07 18:09:02 +02:00
Pierre de La Morinerie
905fca0bd3
models: ensure Champs::Pays#to_s is always a string
...
Before this, the result of `Champs::Pays#to_s` could be `nil`, which
would break various things (like the PDF rendering of these champs).
2021-09-07 10:47:18 -05:00
LeSim
8adbebb525
Merge pull request #6448 from betagouv/add_test_to_dossier_projection_service_fix
...
Ajoute un test a dossier_projection_service concernant l'external id
2021-09-07 15:25:04 +02:00
simon lehericey
9fc195f0e5
add test to dossier_projection_service
2021-09-07 15:17:06 +02:00
Paul Chavard
9c5f624e84
Merge pull request #6437 from tchak/feat-graphql-disable-notifications
...
[GraphQL] Add an option to dossier state change mutations to disable notifications
2021-09-07 14:30:33 +02:00
Paul Chavard
74e277d0a2
feat(graphql): add an option to dossier state change mutations to disable notifications
2021-09-07 14:21:48 +02:00
Paul Chavard
9e30d5fc22
fix(virus scan): prevent virus scans in specs
2021-09-07 14:21:48 +02:00
Paul Chavard
96cbbc0192
fix(virus scan): prevent virus scan on archives and signatures uploads
2021-09-07 14:21:48 +02:00
LeSim
ba0918c675
Merge pull request #6447 from betagouv/main
...
2021-09-07-02
2021-09-07 14:21:10 +02:00
Paul Chavard
92f463bc03
Merge pull request #6446 from tchak/fix-procedure-external_id
...
fix(dossier_projection_service): select external_id on champs
2021-09-07 14:18:41 +02:00
Paul Chavard
084e48c8e3
fix(dossier_projection_service): select external_id on champs
2021-09-07 14:07:55 +02:00
Paul Chavard
830828abd2
Merge pull request #6444 from ismo1/6443-delete_flag_make_experts_notifiable
...
delete features flag option : 'make_experts_notifiable'
2021-09-07 13:59:49 +02:00
LeSim
1f1be70763
Merge pull request #6445 from betagouv/main
...
2021-09-07-01
2021-09-07 12:51:07 +02:00
Ismael MOUSSA S. (T0194673)
9d012d51e8
delete features flag option : 'make_experts_notifiable'
2021-09-07 10:49:20 +02:00
LeSim
581cd8dd03
Merge pull request #6442 from betagouv/fix_undestructible_secondary_value
...
Dans une liste déroulante liée, on s'assure que la réinitialisation de la valeur primaire, réinitialise la valeure secondaire
2021-09-07 10:29:01 +02:00
simon lehericey
367f508e2e
linked_drop_down_list: empty primary => empty secondary
2021-09-07 10:09:18 +02:00
Paul Chavard
1f23295f91
Merge pull request #6436 from tchak/feat-save-user-locale
...
feat(i18n): use locale from user preferences when sending notifications
2021-09-07 10:04:57 +02:00
Paul Chavard
6a5a8233b5
feat(i18n): send dossier emails with its user locale and improuve translations
2021-09-07 09:51:23 +02:00
Paul Chavard
cd9f7df502
feat(i18n): send dossier notifications with its user locale
2021-09-07 09:51:23 +02:00
Paul Chavard
34b1418868
feat(i18n): save locale on user
2021-09-07 09:51:23 +02:00
Paul Chavard
ff7fa4d895
feat(i18n): expose locale on dossier and deleted_dossier
2021-09-07 09:51:23 +02:00
Paul Chavard
f1ff6da81b
feat(i18n): add locale to user
2021-09-07 09:47:01 +02:00
LeSim
072a26394b
Merge pull request #6434 from betagouv/bump-rails
...
Mise à jour de Rails vers la version 6.1.4.1
2021-09-06 17:54:37 +02:00
Pierre de La Morinerie
d4d0c0b1f3
gems: clean brakeman obsolete false-positives
...
These were made obsolete by the new brakeman version.
2021-09-02 16:12:52 -05:00
Pierre de La Morinerie
f9529da8bd
gems: update brakeman
...
This prevent a false-positive warning about a vulnerable loofah version.
We also need to ignore a new warning, about an unsafe redirect. This is
unsafe when the object given in redirect can be a hash that includes
a `:host` key. But here we are redirecting to a plain string, which is
definitely safe.
2021-09-02 16:11:23 -05:00
Pierre de La Morinerie
27376c00b0
gems: bump rails to 6.1.4.1
2021-09-02 15:50:23 -05:00
Pierre de La Morinerie
9aae377516
Merge pull request #6435 from betagouv/cleanup-old-admin-controllers
...
Suppression des anciens contrôleurs ancien-design dans `admin` (#6435 )
2021-09-02 15:47:01 -05:00
Pierre de La Morinerie
8bb283d977
app: delete old Admin::ProceduresController
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
a004ac59df
app: move archive to NewAdministrateur::ProceduresController
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
e7c8a9fff5
app: move clone to NewAdministrateur::ProceduresController
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
56fa7e7cd6
app: move destroy to NewAdministrateur::ProceduresController
...
The code was already moved; only the route and tests were not.
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
3e83ad454f
app: move new_from_existing to NewAdministrateur::ProceduresController
2021-09-02 14:51:31 -05:00
Pierre de La Morinerie
7729385d89
controllers: remove dead code on Admin::ProceduresController
...
This code has been migrated to NewAdministrateur::ProceduresController.
2021-09-02 14:51:26 -05:00
Pierre de La Morinerie
3fc934c8fb
app: remove leftovers of publish_validate route
...
The correponding code and feature have been removed a while ago.
2021-09-02 14:50:41 -05:00
Pierre de La Morinerie
0f9d7d6b8c
app: remove old Admin::InstructeursController
...
It was only hosting the deprecated "Instructeurs globally attached to
this admin", which wasn't used anywhere in the app anymore.
2021-09-02 14:40:36 -05:00
lydiasan
e87ab1dc40
Merge pull request #6438 from betagouv/i18n-translate-instructions-reset-password
...
i18n: ajout des traductions pour la page reset-link-sent
2021-09-02 16:42:12 +02:00
Jérôme Desboeufs
90aebd3021
Update photographies-aeriennes basemap URL
2021-09-02 14:53:24 +02:00
Jérôme Desboeufs
7079af2fd4
Update photographies-aeriennes basemap URL
2021-09-01 21:58:12 +02:00
lydiasan
ed7a9aaf39
ajout des traductions pour la page reset-link-sent
2021-09-01 17:49:52 +02:00
Paul Chavard
a4c20de173
Merge pull request #6433 from betagouv/fix-autosave-null-xhr
...
Correction d'une erreur lors d'un échec de l'enregistrement automatique d'un brouillon
2021-09-01 10:39:50 +02:00
Pierre de La Morinerie
7380d27d78
js: fix null xhr in autosave error handling
...
Sentry reports many cases of the xhr object being missing in the
error handler.
Ensure the error handling code doesn't crash because of the missing xhr.
2021-08-31 14:54:02 -05:00
Pierre de La Morinerie
b709a160fc
Merge pull request #6432 from tchak/update-dependencies
...
Mise à jour des dépendances Javascript (#6432 )
2021-08-31 11:53:00 -05:00
Paul Chavard
5d63ced246
fix(eslint): fix eslint warnings
2021-08-31 18:14:04 +02:00
Paul Chavard
1e46e437bb
build(npm): update npm dependencies
2021-08-31 18:13:38 +02:00
Paul Chavard
9a7c788e2d
Merge pull request #6429 from betagouv/english_country_list
...
Affiche la liste des pays en anglais
2021-08-31 14:27:33 +02:00
Paul Chavard
a3cc072bbd
feat(i18n): translate countries selector
2021-08-31 13:15:26 +02:00