Commit graph

13270 commits

Author SHA1 Message Date
kara Diaby
d5cea74ee9 add procedure number and link into admin dashboard (show) 2021-04-21 17:01:46 +02:00
LeSim
202309da20
Merge pull request #6118 from betagouv/fix-autoloader-warning
Fix "Initialization autoloaded the constants ActionText::ContentHelper" warning message
2021-04-21 15:21:35 +02:00
Pierre de La Morinerie
9ad57fde2a initializers: lazy-load Mailjet gem
This fixes an error message on app startup about autoloaded
constants:

> DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.

The reason for this error is that the Mailjet gem forces the
immediate loading of `action_mailer`. Which leads to the
following sequence of events:

On app init, when bundler requires all the gems in the Gemfile:
- The Mailjet gem is required,
- It loads `ActionMailer::Base`.

Later, when Rails initializes itself:
- `ActionText` creates an `action_text.helpers` initializer,
- This initializer register hooks to add `ActionText` helpers
when either `action_controller_base` or `action_mailer` are loaded,
- But as `action_mailer` has already been loaded, the hook is trigerred
immediately,
- ActiveSupport::Dependencies notices `ActionText` constants do not
exist yet, auto-load them, and add the constants to
`ActiveSupport::Dependencies.autoloaded_constants`.

And even later, at the end of the Rails initialization process:
- The `:warn_if_autoloaded` initializer is run,
- It notices that `autoloaded_constants` is not empty, and prints the
warning message.

See https://github.com/mailjet/mailjet-gem/issues/213
2021-04-20 15:11:43 +02:00
Pierre de La Morinerie
b96151934e
Merge pull request #6115 from betagouv/dependabot/npm_and_yarn/ssri-6.0.2
Dépendances : mise à jour de ssri de 6.0.1 à 6.0.2 (#6115)
2021-04-20 13:47:28 +02:00
dependabot[bot]
591f7c42c2
Bump ssri from 6.0.1 to 6.0.2
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 11:10:27 +00:00
Kara Diaby
c62751d006
Merge pull request #6116 from betagouv/fix-flaky-experts-test
spec: fix flaky expert test
2021-04-20 12:53:50 +02:00
Pierre de La Morinerie
7ee29b2190 spec: fix flaky expert test
In this test, two Avis are created for each expert:
- one for the original dossier,
- one for the dossier linked to the original dossier.

When we check for a sign-up link, we should do so using the
Avis for the original dossier explicitely.
2021-04-20 12:06:12 +02:00
Pierre de La Morinerie
d264ab3b8e
Merge pull request #6106 from betagouv/improve-password-reset
Amélioration de l'interface de ré-inititialisation de mot de passe (#6106)
2021-04-20 09:52:51 +02:00
Pierre de La Morinerie
8cb7a49dd9 password: add password reset instructions 2021-04-20 09:34:53 +02:00
Pierre de La Morinerie
53fc7386f1 sign_in: fix the procedure preview not being hidden on mobile 2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
85691b9f2e sign_in: no need to specify password length 2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
6b14420ffa sign_in: improve "Forgot password?" appearance on mobile 2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
0749d981ab password: make the "Reset password" button clearer 2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
fffb85987c app: retain user email on sign-in error 2021-04-20 09:34:52 +02:00
Kara Diaby
5b301353f0
Merge pull request #6113 from betagouv/main
2021-04-19-01
2021-04-19 11:21:38 +02:00
Kara Diaby
8640770a15
Merge branch 'production' into main 2021-04-19 11:13:38 +02:00
Kara Diaby
aee76746c4
Merge pull request #6109 from betagouv/button-instead-feature-flag-avis
ETQ Administrateur, je veux pouvoir facilement choisir si je veux gérer les experts sur mon interface
2021-04-19 11:10:27 +02:00
kara Diaby
5982660c37 tests 2021-04-19 10:23:45 +02:00
kara Diaby
6524b6bcb7 layout 2021-04-19 10:23:45 +02:00
kara Diaby
881491c697 add route 2021-04-19 10:23:45 +02:00
kara Diaby
01a91fb35b modify controllers 2021-04-19 10:23:45 +02:00
kara Diaby
541a36abbf Add boolean to procedures table 2021-04-19 10:23:45 +02:00
LeSim
f86bc605a7
Merge pull request #6111 from betagouv/main
2021-04-16-01
2021-04-16 15:03:26 +02:00
LeSim
2bb3dca9e9
Merge pull request #6110 from betagouv/instructeur_procedure_show_another_try
amélioration des temps de réponse instructeur procedure show
2021-04-16 14:29:53 +02:00
simon lehericey
e0959cda1e constantize hot strings
- 1131 objects over 4220 (-25%) created in app/
2021-04-16 13:13:22 +02:00
simon lehericey
47f13219ed Avoid useless TypeDeChamp deserialization
- 520 objects overs 4720 (10%) created in app/ (using ?pp=profile-memory&memory_profiler_allow_files=app/)
2021-04-16 13:13:22 +02:00
simon lehericey
e728a3fcb7 include type_de_champ
Avoid n+1 when matching champ.stable_id in procedure.presentation.displayed_fields_values
win 2s in the worst 3s scenario
2021-04-16 13:13:22 +02:00
Paul Chavard
f6c704d44d
Merge pull request #6095 from tchak/improuve-user-destruction
Users that are experts should not be deletable
2021-04-15 18:23:34 +01:00
Paul Chavard
ea484b879e Prevent expert users to be deleted 2021-04-15 16:17:36 +01:00
Pierre de La Morinerie
3104b4bf17
Merge pull request #6103 from tchak/fix-api-doc-link
Correction du lien vers la documentation de l'API (#6103)
2021-04-15 17:16:02 +02:00
Paul Chavard
f08d704d5f Fix api docs URL 2021-04-15 17:06:23 +02:00
Pierre de La Morinerie
b9e949b481
Merge pull request #6104 from betagouv/update-devise-two-factor
Mise à jour de la gem `devise-two-factor` (#6104)
2021-04-15 17:05:29 +02:00
Pierre de La Morinerie
f7d71ba698 gems: update devise-two-factor to a released version
This is the first official release compatible with Rails 6.1.
2021-04-15 16:54:14 +02:00
Pierre de La Morinerie
727bc4a2ce
Merge pull request #6101 from betagouv/check-zeitwerk
CI : teste automatiquement la conformité des classes avec Zeitwerk (#6101)
2021-04-15 16:51:16 +02:00
Pierre de La Morinerie
f8757ea053
Merge pull request #6098 from adullact/6094_enable_rspec_only-failures_support
Développeur : documente l'option de rspec pour ne faire passer que les tests échoués précédemment
2021-04-15 14:26:20 +02:00
Fabrice Gangler
92ccff785a Doc(test): add rspec only-failures example 2021-04-15 14:17:39 +02:00
François Vantomme
f747b0a46a Chore(test): enable rspec only-failures support 2021-04-15 14:17:39 +02:00
Pierre de La Morinerie
c96a2550d8 ci: check for zeitwerk errors
If a zeitwerk-incompatible class is introduced, it won't break
any test before reaching production.
2021-04-15 13:17:46 +02:00
Kara Diaby
ad5c1a4018
Merge pull request #6100 from betagouv/main
2021-04-15-01
2021-04-15 12:43:00 +02:00
Kara Diaby
d415257111
Merge branch 'production' into main 2021-04-15 12:32:30 +02:00
Pierre de La Morinerie
776ca5a048
Merge pull request #6099 from betagouv/fix-expert-mailer
Corrige `AvisMailerPreview` en `ExpertMailerPreview` (#6099)
2021-04-15 12:31:19 +02:00
kara Diaby
198e3ed3b8 expert mailer instead of avis mailer 2021-04-15 12:22:40 +02:00
Kara Diaby
f2f85f0d8f
Merge pull request #6097 from betagouv/main
2021-04-15-01
2021-04-15 11:52:23 +02:00
Kara Diaby
22a14701a4
Merge pull request #6078 from betagouv/feat/5815
ETQ instructeur, lorsque je termine un dossier, les experts notifiable recoivent un mail leur indiquant qu'une nouveauté est présente
2021-04-15 11:42:29 +02:00
kara Diaby
f4aa29a799 add expert mailer preview 2021-04-15 11:29:55 +02:00
kara Diaby
663fa50f02 notify expert when a decision is taken on a dossier 2021-04-15 11:29:55 +02:00
krichtof
c2dbb55a88
Merge pull request #6090 from betagouv/6088-superadmin-manager
Manager : affichage et suppression des SuperAdmin
2021-04-15 10:20:54 +02:00
Christophe Robillard
54f2b9dc7e [manager] remove super admin 2021-04-15 10:12:11 +02:00
Christophe Robillard
db48ea02aa [manager] list superadmins 2021-04-15 10:12:11 +02:00
Pierre de La Morinerie
2c50fb29e2
Merge pull request #6091 from tchak/fix-discarded-destruction
Correction des données liées aux dossiers qui doivent être effacées lors de la suppression (#6091)
2021-04-15 09:13:07 +02:00