Commit graph

7114 commits

Author SHA1 Message Date
Paul Chavard
e269077c40 refactor(attestation_template): cleanup relationships 2022-02-11 08:45:32 +01:00
Paul Chavard
88e80e9e32
Merge pull request #6901 from adullact/feature/6859-jwt-token-expiration
[API Entreprise] Ajout du support des jetons JWT sans clé d'expiration
2022-02-10 11:48:39 +01:00
Kara Diaby
a6b2873bfc modify instructeur model 2022-02-09 14:43:36 +01:00
Kara Diaby
0ce61f451e modify dossier model 2022-02-09 14:43:36 +01:00
Paul Chavard
1f661325a5 refactor(carto): use maplibre instead of mapbox 2022-02-09 10:29:00 +01:00
Paul Chavard
ea6aec8b1a chore(webpack): enable typescript 2022-02-09 10:29:00 +01:00
Paul Chavard
12151acb99 Revert "Revert "feat(attestation): revise attestations""
This reverts commit 4e7733e571.
2022-02-08 16:22:59 +01:00
Pierre de La Morinerie
847abca122 config: simplify mailer configuration again
Move everything to initializers, and replace the email settings
interceptor by a BalancerDeliveryMethod.

It has the advantage that it can be configured entirely from the
`config/environment.rb` file, without an extra file to look at.
2022-02-08 12:44:43 +01:00
Pierre de La Morinerie
04cfc8ed9d config: use alternate delivery methods to configure ActionMailer
Previously `SENDINBLUE_BALANCING` was used only when
`SENDINBLUE_ENABLED` was *disabled* (otherwise only SendInBlue was ever
used).

This commit:

- Ensure that `SENDINBLUE_BALANCING` is used only when SendInBlue is
  *enabled* (which is more intuitive).
- Make it easier to add other delivery methods.
2022-02-08 12:44:43 +01:00
Paul Chavard
ad545771b7
Merge pull request #6918 from adullact/feature/6875-improve-landing-contrast
Amélioration du contraste de la landing page administration
2022-02-08 12:30:18 +01:00
LeSim
fe9adf061c
Merge pull request #6916 from adullact/feature/6873-dinum-vars
Déplacer toutes les mentions à la DINUM dans des variables
2022-02-08 11:58:05 +01:00
LeSim
fdc4e5bfbc
Merge pull request #6928 from adullact/feature/6886-watermark-url
Watermark depuis une URL distante
2022-02-08 11:45:26 +01:00
Pierre de La Morinerie
9a3109d960 stylesheet: add space between big number cards elements 2022-02-08 11:43:32 +01:00
Paul Chavard
0268511264 fix(manager): remove admins added for a day
fix #6855
2022-02-08 11:18:44 +01:00
François Vantomme
eba9a87123
refactor(API Entreprise): raise an error on blank token 2022-02-07 15:18:16 +01:00
Jon
88d3a6e4c3
feat: can have remote watemark file 2022-02-04 18:55:16 +01:00
François Vantomme
1f64d45ba4
refactor(footer): improve provided by rendering 2022-02-04 18:30:26 +01:00
François Vantomme
62562ff7a5
feat(landing): improve CTA rendering 2022-02-04 18:26:04 +01:00
François Vantomme
51cfd3d7ad
feat(env): add env variables for the provider data 2022-02-04 18:20:06 +01:00
Kara Diaby
5d10158fa6 Instructeur : ne peut plus cliquer sur un dossier supprimé dans la recherche 2022-02-03 11:17:39 +01:00
Christophe Robillard
b80ec84552 fix a11y-8.9.1 for attachement description error 2022-02-02 19:03:40 +01:00
Christophe Robillard
447612abdf fix a11y-8.9.1
no p tag when Champ text with no value
2022-02-02 19:03:40 +01:00
Pierre de La Morinerie
e6cf07b810 stats: move date formatting out of the Stat model
Before this commit, the monthly dossiers count was serialized into the
Stat record using human-formatted dates, as:

```ruby
s.dossiers_in_the_last_4_months = {
  "octobre 2021"=>409592,
  "novembre 2021"=>497823,
  "décembre 2021"=>38170,
  "janvier 2022"=>0
}
```

Turns out the ordering of keys in a serialized hash is not guaranteed.
After a round-trip to the database, the keys will be wrongly sorted.

Instead we want to save raw Date objects, which will preserve the
ordering. The date formatting can be applied at display-time by the
controller.

Fix #6848
2022-02-02 14:13:53 +01:00
Kara Diaby
81249aa798 Instructeurs : fixe la recherche cassée dans la précédente release 2022-02-02 09:33:28 +01:00
Kara Diaby
8d2f4597fa fix recherche on supprimes_recemment dossiers instructeurs 2022-02-01 16:54:09 +01:00
Pierre de La Morinerie
ca58e60dc0 validators: rename revisions namespace to types_de_champ 2022-02-01 12:37:16 +01:00
Pierre de La Morinerie
d680602c84 models: validate private types_de_champ 2022-02-01 12:37:16 +01:00
Pierre de La Morinerie
e8e37cce15 models: refactor the types_de_champ validators
Context: we want to validate public and private types_de_champ
separately.

Before we validated the whole revision (and then validators themselves
enumerated all champs, public and private).

Now we validate the actual public types_de_champ, which will let us
validate separately the private types_de_champ.
2022-02-01 12:37:16 +01:00
Kara Diaby
82ddad125f layout 2022-01-31 10:03:44 +01:00
Kara Diaby
0f968f4c4e modify models 2022-01-27 17:01:27 +01:00
Kara Diaby
a94568e2ef modify procedures controller 2022-01-27 17:01:09 +01:00
Pierre de La Morinerie
387701e7cb config: add a new SAML_IDP_ENABLED env var
This fixes the app crashing on launch when using the production profile,
because the certificates are not present.
2022-01-26 16:45:50 +01:00
Paul Chavard
4e7733e571 Revert "feat(attestation): revise attestations"
This reverts commit e413872530.
2022-01-25 18:26:34 +01:00
Paul Chavard
a9c4a81ab0 fix dossier mailer templates 2022-01-25 11:46:05 +01:00
Kara Diaby
2eb35065f8 fix dossier deletion mailers 2022-01-25 11:46:05 +01:00
Kara Diaby
0e3532a0b2 Fixe la liste 'tous' des dossiers instructeurs lorsqu'un dossier est en constructino et caché par l'usager 2022-01-24 16:47:47 +01:00
Martin
47fa95a577 feat(MonAvisEmbedValidator): allow mon avis button without title 2022-01-24 15:56:29 +01:00
Paul Chavard
e413872530 feat(attestation): revise attestations 2022-01-19 18:00:37 +01:00
Paul Chavard
c1cb89bb44 fix(revision): changed? conflicts with rails method 2022-01-19 18:00:37 +01:00
Paul Chavard
3d8471e064 fix(dossier): do not send notification on expiration when dossier is already deleted 2022-01-19 17:52:53 +01:00
Pierre de La Morinerie
68fd3aea39 config: rename SOURCE to LOGRAGE_SOURCE 2022-01-19 15:43:44 +01:00
Pierre de La Morinerie
d4fada9f6c config: add MATOMO_HOST environment variable 2022-01-19 15:43:44 +01:00
Kara Diaby
8490826a78 import csv gi available only for published procedures 2022-01-18 13:21:11 +01:00
Paul Chavard
403e71b41f feat(procedure): only purge procedures without dossiers 2022-01-18 11:22:04 +01:00
Paul Chavard
7937e58caa fix(archives): only export dossiers in archive groupe_instructeurs
fix #6793
2022-01-18 11:16:20 +01:00
Paul Chavard
902f7f6cb3 fix(select): improuve multi select onBlure 2022-01-13 17:49:16 +01:00
Paul Chavard
7e81b257b1 test(system): simplify select menu selector 2022-01-13 17:49:16 +01:00
Paul Chavard
7e0d471a08 improuve discarded_expired scopes 2022-01-12 15:49:38 +01:00
Kara Diaby
68b45ae31d modify instructeur procedures controller 2022-01-12 15:49:38 +01:00
Kara Diaby
e2caf5718f modify instructeur model 2022-01-12 15:49:38 +01:00
Kara Diaby
4606650248 layout 2022-01-12 15:49:38 +01:00
Kara Diaby
894b065615 modify dossier model 2022-01-12 15:49:37 +01:00
Kara Diaby
006eac4240 modify controller 2022-01-12 15:49:37 +01:00
Paul Chavard
4a718eae92 fix(select): always show menu on click in the input
fix #6655
2022-01-11 12:11:45 +01:00
Paul Chavard
967699c305 fix(select): improuve no results found message 2022-01-11 12:10:20 +01:00
Pierre de La Morinerie
062f52feb9 Fix ProcedureAdministrateursController#destroy
- The "no remove oneself" rule wasn't actually enforced
- `flash.error` is not a flash category
2022-01-07 15:39:58 +01:00
Martin
383a92bcd9 fix(parallel_download_queue): tophoeus does not like raise from a request handler [crash straight to first frame] 2022-01-07 14:24:37 +01:00
Pierre de La Morinerie
2e1a3c32cb helpers: handle flash[:error]
Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).

We probably shouldn't use flash[:error] in our own codebase; but we can
handle its use in third-party libraries.
2022-01-06 14:09:31 +01:00
Pierre de La Morinerie
68b112e00a helpers: don't crash on unknown flash level
Errors generated by the `invisible-catcha` gem are reported as
`flash[:error]` (which differs from Rail's usual `flash[:alert]`).

Avoid crashing when the flash level passed to this helper is not known.
2022-01-06 14:09:26 +01:00
Martin
f770ac4907 fix(users/champs/piece_justificative#update): ensure to bump dossier.last_champ_updated_at otherwise instructeurs are not notified when user update their piece_justificative 2022-01-06 13:09:57 +01:00
Martin
a9ffaf942e feat(attestation): can enable/disable attestation no matter the state of the procedure 2022-01-05 18:20:11 +01:00
Paul Chavard
28c1763701 a11y(champs): generalize describedby and update to use new Combo props 2022-01-05 12:33:40 +01:00
Paul Chavard
3513182e7c a11y(select): use new ComboMultiple component 2022-01-05 12:33:40 +01:00
Paul Chavard
d6b6bb0f2a a11y(combobox): add support for describedby and labelledby and improuve external fields handling 2022-01-05 12:33:40 +01:00
Paul Chavard
fc058f721d a11y(champs): expose ids for UI on champ 2022-01-05 12:33:40 +01:00
simon lehericey
00871cfe13 Fix ping controller in dev
For an unknown reason, ActiveRecord::Base.connected? does not work anymore in dev. It returns false negative.

This simple workaround can timeout. The caller has to monitor the response time.
2022-01-05 11:44:32 +01:00
Martin
3eb1c1a421 feat(async_backend): switch to typhoeus 2022-01-04 16:27:23 +01:00
Martin
ce1b189dcd refactor(DownloadManager): extract parallel download in dedicated class. move error management in custom class for procedure exports using the didicated class 2022-01-04 16:17:03 +01:00
Martin
2ed9cccba0 extract download all attachments in dedicated class using async/async-http for better perf 2022-01-04 16:17:03 +01:00
Martin
252eee272b feat(support#create): block with invisible captcha [avoid painful captcha] 2022-01-04 14:49:00 +01:00
Paul Chavard
7f0dde9be4 fix(a11y): add aria to tabs 2022-01-04 09:44:32 +01:00
Paul Chavard
6776a5e05a fix(react): remove register component cache 2022-01-03 19:41:23 +01:00
Kara Diaby
1ca553e088 rename hidden_by_instructeur by hidden_by_administration 2022-01-03 11:51:25 +01:00
Paul Chavard
ad4be3c482 refactor(dossier): handle discard by admin and super admin 2022-01-03 11:51:25 +01:00
Kara Diaby
b408811c5a l'expert ne voit pas les dossiers supprimés par l'instructeur 2022-01-03 11:51:25 +01:00
Kara Diaby
051d7b2028 change dossier method 2021-12-29 17:37:58 +01:00
Kara Diaby
37e991ccb8 User : delete the folder if the instructeur has hide it 2021-12-29 17:37:58 +01:00
Kara Diaby
7d7b847437 Instructeur : delete the folder if the user has hide it 2021-12-29 17:37:58 +01:00
Kara Diaby
22ac853815 add hidden_by_instructeur scope 2021-12-29 17:37:58 +01:00
Kara Diaby
f239d46a45 add hide_dossier method to instructeurs 2021-12-29 17:37:57 +01:00
Kara Diaby
cd95b730e0 add hidden_by_instructeur_at on dossiers 2021-12-29 17:37:57 +01:00
Martin
d0ab1711ff fix(profil_controller#update_email): ensure we are not merging same account
fix(profil_controller#update_email): changing email from current_user.email to current_user.email destroy current user. whoops ☠️'

Update config/locales/en.yml

Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>

Update config/locales/fr.yml

Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>

Update spec/controllers/users/profil_controller_spec.rb

Update config/locales/fr.yml

Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>

Update spec/controllers/users/profil_controller_spec.rb

fix(spec): broken due to typo
2021-12-29 13:36:47 +01:00
Christophe Robillard
6e36fee7b3 superadmin can display list of procedures without zone 2021-12-23 19:18:46 +01:00
Christophe Robillard
90c971567d superadmin can show zone for a procedure 2021-12-23 19:07:42 +01:00
Christophe Robillard
c7b5e57d2a superadmin can get procedures from zone 2021-12-23 19:07:42 +01:00
Christophe Robillard
537e6066d8 add Zones dashboard for superadmin 2021-12-23 19:07:42 +01:00
Christophe Robillard
878f735a80 facilite le remplissage automatique de l'email 2021-12-23 19:00:10 +01:00
Paul Chavard
4e779f445d fix(instructeur): copy notifications settings from previous groupe instructeur
fix #6763
2021-12-23 13:55:25 +01:00
Paul Chavard
2f6cd317bf fix(instructeur): set notification settings on all groupe instruteur for given procedure 2021-12-23 13:55:25 +01:00
Christophe Robillard
eda8aacfe4 fix a11y problem for support page
L'interpolation de `support.index.product.answer_html` produisait des balises p vides, ce qui contrevenait au critère 8.9.1 RGAA (https://www.numerique.gouv.fr/publications/rgaa-accessibilite/methode/criteres/#test-8-9-1)
2021-12-23 10:49:52 +01:00
Pierre de La Morinerie
07230870d3 js: don't track external links
This fixes an issue where, by default, links to private attachments are
reported to Matomo.

This is benign: attachments URLs can be filtered out server-side, and
expire after one hour anyway. But we don't want to ship an insecure
configuration by default.
2021-12-23 09:50:21 +01:00
Paul Chavard
f8d245d2f8 refactor(js): use dynamic import 2021-12-21 17:09:49 +00:00
Paul Chavard
26f65e250c fix(a11y): better contrast on placeholders 2021-12-21 16:50:31 +00:00
Paul Chavard
1c6ff09c5b fix(a11y): stop using th in presentation only tables 2021-12-21 16:50:31 +00:00
Paul Chavard
64104f9fc3 fix(a11y): criteria 11.1 2021-12-21 16:50:31 +00:00
Paul Chavard
fc90dca920 fix(a11y): criteria 10.5 2021-12-21 16:50:31 +00:00
Paul Chavard
e264472481 fix(procedures): fix check to enable procedure delete 2021-12-16 17:28:42 +00:00
Christophe Robillard
882f92268c update zone to procedures 2021-12-16 17:20:06 +01:00
François Vantomme
14e0c68266 feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
François Vantomme
f08081abfe fix(api particulier): remove $def key from pole emploi JSON schema 2021-12-16 16:45:18 +01:00