Commit graph

1405 commits

Author SHA1 Message Date
kara Diaby
da1d83b967 add route 2021-06-04 15:29:08 +02:00
Pierre de La Morinerie
fcd5df3c2b i18n: add missing i18n keys for User model
The key for naming the User model was missing – so the default
localization from devise-i18n was used. Unfortunately devise-i18n lacks
the plural form.

This fixes the manager dashboard displaying "User" instead of "Users".
2021-05-27 16:08:55 +02:00
François Vantomme
bc6d5aca0e Fix (Sentry): prefer Rails secrets over ENV variables 2021-05-27 11:12:27 +02:00
Jon
2a0a65a90f fix(sentry): specify current environment for sentry config 2021-05-27 11:12:27 +02:00
Paul Chavard
9b0dae4cc2 Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
lydiasan
2d6ad4f2c1
Merge branch 'main' into localize-dropdown-button 2021-05-25 14:45:52 +02:00
Pierre de La Morinerie
d93342e1d7 config: cleanup allowed tags after Rails 6.1 migration 2021-05-25 11:06:53 +02:00
Paul Chavard
e74dcb0056 Remove ign feature flag 2021-05-24 11:50:16 +02:00
Paul Chavard
01c558953b Remove API GEO legacy adapter 2021-05-24 11:50:16 +02:00
kara Diaby
b3caa2e5f4 add route 2021-05-18 11:42:10 +02:00
lydiasan
42153d1d37 ajout du selecteur de langue 2021-05-12 16:30:35 +02:00
Paul Chavard
8a74438dc1 Use conservation_extension instead of en_construction_conservation_extension 2021-05-11 17:33:53 +02:00
Paul Chavard
e8cdded515 Use explicit name to avoid unknown constant errors 2021-05-06 16:10:48 +02:00
Pierre de La Morinerie
b8f71bd52c i18n: fix enum values for Dossier.state
According to Rails i18n guide, enum values should be localized
as `<model>/<enum>`, not as sub-values to the attribute.

This fixes an exception in administrate when displaying a Dossier
in the Manager.

Note: we need to change the way GraphQL attributes are generated, because
`AASM::Core::State#display_name` doesn’t honor the `model/attribute.value`
convention (and instead tries to localize as `model.attribute/value`).
So instead we lookup the localized name using ActiveRecord.
2021-05-06 14:38:25 +02:00
Paul Chavard
327bec0637 Use HELO 2021-05-06 08:59:18 +02:00
Christophe Robillard
2516abc277 activate rack_mini_profiler in dev and display query count 2021-05-05 17:16:10 +02:00
Paul Chavard
bcbfcdc537 Revert "Merge pull request #6142 from tchak/enable_brouillon_extend_conservation"
This reverts commit 48eb4d9778, reversing
changes made to 5539d5cb8c.

# Conflicts:
#	app/models/dossier.rb
#	db/schema.rb
2021-05-04 16:03:29 +02:00
Paul Chavard
b2a867266a Allow users to extend conservation on drafts 2021-04-29 19:50:30 +02:00
Christophe Robillard
f40d96fbd2 Revert "Revert "Export de tous les dossier d'une démarche""
This reverts commit d9a588b52e.
2021-04-29 17:29:47 +02:00
krichtof
d9a588b52e
Revert "Export de tous les dossier d'une démarche" 2021-04-29 16:07:18 +02:00
Pierre de La Morinerie
fbfe5c3817 jobs: also retry native ActiveStorage's jobs on transient errors 2021-04-29 14:08:12 +02:00
Christophe Robillard
59a08ad307 affiche quand l'archive a été générée 2021-04-28 11:40:58 +02:00
Christophe Robillard
8b2849408c instructeurs can create and download archives 2021-04-28 11:40:58 +02:00
Pierre de La Morinerie
4a12e973bf i18n: add unbreakable spaces to reset_link_sent locales 2021-04-27 13:56:57 +02:00
Pierre de La Morinerie
d530b272a1 password: add specific page for reset instructions 2021-04-22 14:24:15 +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
8cb7a49dd9 password: add password reset instructions 2021-04-20 09:34:53 +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
kara Diaby
881491c697 add route 2021-04-19 10:23:45 +02:00
Paul Chavard
f08d704d5f Fix api docs URL 2021-04-15 17:06:23 +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
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
Paul Chavard
651a928b7c Improuve export UI 2021-04-08 14:40:26 +01:00
simon lehericey
44f9ae3c65 only preload what is needed on most requests 2021-04-06 18:23:14 +02:00
simon lehericey
b87a691176 use env for localization to avoid db round trip 2021-04-06 18:23:14 +02:00
simon lehericey
cd4ad6878c remove insee_api_v3 feature 2021-04-06 18:23:14 +02:00
simon lehericey
06d2eb2d21 remove feature xray 2021-04-06 18:23:14 +02:00
simon lehericey
c2847d1481 remove unused mini_profiler var 2021-04-06 18:23:14 +02:00
simon lehericey
6f2b2c3c1f use env for maintenance mode to avoid DB roundtrip 2021-04-06 18:23:14 +02:00
simon lehericey
1715a4899f remove coronavirus banner 2021-04-06 18:23:14 +02:00
Pierre de La Morinerie
62051c926a app: move update_allow_decision_access to ExpertsController 2021-04-06 14:54:18 +02:00
Pierre de La Morinerie
c82c72402d app: move the experts list to ExpertsProceduresController 2021-04-06 14:29:02 +02:00
Pierre de La Morinerie
7acb4cee83 controllers: use standard action names in ExpertsProceduresController 2021-04-06 13:45:51 +02:00
Pierre de La Morinerie
3f25624a5a routes: nest ExpertsProcedures routes in a resource 2021-04-06 13:18:51 +02:00
Pierre de La Morinerie
42b3ba1e1b config: migrate all config to Rails 6.1 defaults 2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
ce427784e7 config: enable has_many_inversing 2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
6bc608a821 config: enable most Rails 6.1 defaults 2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
c2ce20d40c config: form_with now generates local forms by default
We can remove the `local: true` parameter, as it is now implied by
default.
2021-04-06 12:12:57 +02:00