Commit graph

2425 commits

Author SHA1 Message Date
Martin
8b487c847b fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation 2022-06-14 08:41:09 +02:00
Kara Diaby
d58ecb3fcc Lors de la restauration d'une démarche supprimée, met sur les dossiers liés hidden_by_administration_at à nil 2022-06-10 12:33:47 +02:00
Kara Diaby
d2bd2ffcbe controller 2022-06-08 14:38:17 +02:00
Kara Diaby
df2b4408c2 procedure.service.nom instead of organisation if service exists 2022-06-01 15:11:26 +02:00
Pierre de La Morinerie
c1616adf8c app: remove procedure-estimated-fill-time feature-flag
The feature is now enabled for every procedure.

Ref #7338
2022-06-01 11:11:55 +02:00
Martin
cb890343ff feat(targeted_user_link): add targeted user link to wrap expert invitation in order to avoid access issue when the expert is connected with another account
feat(user.merge): ensure to merge user.targeted_user_link

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

Update app/models/targeted_user_link.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>

feat(db/create_targeted_user_links): ensure not null with fk
2022-05-31 14:50:31 +02:00
Paul Chavard
a36672239d refactor(revision): rename find_or_clone_type_de_champ 2022-05-31 08:58:53 +02:00
Paul Chavard
6f98def288 refactor(revision): remove old code 2022-05-31 08:58:53 +02:00
Kara Diaby
37272f90a0 controller 2022-05-30 14:40:49 +02:00
Kara Diaby
3c5808fe03 controller 2022-05-26 12:45:05 +02:00
Pierre de La Morinerie
ac6ae94c93 controllers: add a TypesDeChamp#estimate_fill_duration action 2022-05-25 21:50:49 +02:00
Christophe Robillard
fd98247b48 [manager] add list of dubious procedures 2022-05-25 14:44:53 +02:00
Paul Chavard
5ddda15961 refactor(invites): use turbo 2022-05-24 18:44:51 +02:00
Paul Chavard
e257a05150 feat(dossier): preview should save dossier 2022-05-24 17:02:05 +02:00
Paul Chavard
50aa50b047 refactor(type_de_champ): use children_of when serializing type_de_champ 2022-05-23 18:22:42 +02:00
Paul Chavard
99a8786dd5 fix(expert): expert should be allowed to delete messages 2022-05-20 15:47:48 +02:00
simon lehericey
8bd3de2050 remove use of repetition.types_de_champ (except rebase) 2022-05-18 15:18:17 +02:00
Paul Chavard
e33022ffc7 refactor(dossier): export to use turbo-poll 2022-05-17 16:08:47 +02:00
Paul Chavard
e9b02642c5 refactor(attachment): attachments controller to use turbo 2022-05-17 16:08:47 +02:00
Paul Chavard
2eb7da5227 fix(dossier): redirect on not found dossiers 2022-05-17 11:42:10 +02:00
Paul Chavard
95bd13872b refactor(dossier): change state with turbo 2022-05-13 17:38:09 +02:00
Martin
da57a1dc9e fix(commencer#commencer): broken due to missing interpolated variable in i18n 2022-05-13 13:15:31 +02:00
Martin
0826baeba3 bug(commencer#commencer): raise when procedure does not have a service
fix(commencer#commencer): use alternate message when procedure does not have a service
2022-05-12 16:41:11 +02:00
Paul Chavard
c9b8d43acd feat(autosave): use new autosave controller 2022-05-10 18:10:20 +02:00
Kara Diaby
990fc04b03 controller 2022-05-10 16:16:16 +02:00
Paul Chavard
9e0b3b642f cleanup(sendinblue): remove sendinblue tracking 2022-05-06 11:14:44 +02:00
Kara Diaby
5f6f19871f tests 2022-05-06 09:04:15 +02:00
Paul Chavard
dcd9e44ce7 fix(dossier): on dossier update render empty js response 2022-05-05 13:39:24 +02:00
Martin
3737311390 feat(procedure.procedure_expires_when_termine_enabled): enable by default, allow contributor to choose the default settings of this flag using an env var during migration. ie: DEFAULT_PROCEDURE_EXPIRES_WHEN_TERMINE_ENABLED=true|false
feat(administrateurs/procedures#show): warning/alert when procedure_expires_when_termine_enabled is not true on current procedure

feat(administrateur/procedure#update): after an update redirect to procedure show: suggested by: https://ux.stackexchange.com/questions/55291/after-updating-form-should-redirect-back-to-form-itself-or-to-the-show-page-or-b and confirmed by Olivier

clean(Flipper.archive_zip_globale): no more in use, so remove all occurences

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update app/views/administrateurs/procedures/_suggest_expires_when_termine.html.haml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

Update spec/views/administrateurs/procedures/show.html.haml_spec.rb

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

fix(review): typo, why ena?, who knows

fix(env.example.optional): add missing DEFAULT_PROCEDURE_EXPIRES_WHEN_TERMINE_ENABLED
2022-05-05 13:07:11 +02:00
Paul Chavard
1a9f2f0eef refactor(champ): improuve repetition champ 2022-05-04 17:18:52 +02:00
Pierre de La Morinerie
9bc5364ca2 app: add controller and view to generate a deposit receipt 2022-05-04 16:09:52 +02:00
Paul Chavard
2d1370d123 refactor(champ): simplify repetition champ 2022-05-03 16:14:54 +02:00
Paul Chavard
39ecc669b1 refactor(champ): simplify dossier link champ 2022-05-03 16:14:54 +02:00
Paul Chavard
4604be0796 refactor(champ): simplify carte champ 2022-05-03 16:14:54 +02:00
Paul Chavard
3384b535c5 refactor(champ): simplify siret champ 2022-05-03 16:14:54 +02:00
Paul Chavard
edba12705b feat(controller): add read_param_value helper 2022-05-03 16:14:54 +02:00
simon lehericey
14f841cdf2 show dolist logs to manager 2022-04-28 15:48:54 +02:00
Martin
552208a03c fix(commencer/test): with procedure without service nor organisation, no more crashes
Update app/controllers/users/commencer_controller.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
2022-04-28 14:19:55 +02:00
Martin
2529773515 bug(commencer/test): with procedure without service nor organisation, it crashes 2022-04-28 14:19:55 +02:00
Paul Chavard
669b3ce5c3 refactor(siret): remove preview special case 2022-04-28 12:20:41 +02:00
Paul Chavard
68ca9efba0 feat(dossier): use persisted dossier for preview 2022-04-28 12:20:41 +02:00
Martin
be090a1bec feat(administrateur/procedure#create): allow admin to add a lien to the DPO, allow user to consult link to dpo. enhance spec on _procedure_footer.html
Update spec/views/users/_procedure_footer.html.haml_spec.rb

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2022-04-27 15:09:02 +02:00
Paul Chavard
91879b89ce fix(commentaire): unified destroy commentaire 2022-04-26 14:54:58 +02:00
Paul Chavard
009c44cc20 refactor(avis): remove unused controller action 2022-04-26 14:54:58 +02:00
Paul Chavard
8d0383c6f8 refactor(turbo): use turbo in root controller 2022-04-21 19:41:27 +02:00
Kara Diaby
900b8f7be6 controller 2022-04-14 10:22:37 +02:00
simon lehericey
1dcfb2509f check nonce 2022-04-11 14:40:02 +02:00
simon lehericey
9938586d96 check state 2022-04-11 13:56:27 +02:00
Paul Chavard
90dd5bc9c5 fix(dossiers): dossier extend_conservation actually works 2022-04-08 13:40:28 +02:00
simon lehericey
51b71aaa01 always call create_list_from_dossiers 2022-04-07 12:06:13 +02:00
Martin
9bac5c65ba feat(instructeurs/dossier#create_avis): only followed dossier receive notifications, so when an instructeur ask for an avis, he follows the dossier
Update app/controllers/concerns/create_avis_concern.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>

Update spec/controllers/instructeurs/dossiers_controller_spec.rb

Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
2022-04-07 09:05:23 +02:00
Paul Chavard
5bfcae1c0f fix(dossiers): show correct count on download button 2022-04-06 17:08:38 +02:00
Paul Chavard
23e2429d0d fix(export): make count argument optional 2022-04-06 17:08:38 +02:00
Paul Chavard
e82dc9c8b5 feat(exports): add ability to create exports with filters 2022-04-06 17:08:38 +02:00
Paul Chavard
ec3ed049ef refactor(procedure_presentation): expose filtered_sorted_ids method 2022-04-05 15:50:53 +02:00
Paul Chavard
0daae815d8 refactor(dossier): use by_statut 2022-04-05 09:42:23 +02:00
Paul Chavard
6da54936b7 refactor(procedure_presentation): use internal reference to instructeur 2022-04-05 09:42:23 +02:00
simon lehericey
57f9e5bac3 always allow dossier pjs download (-9 queries) 2022-04-04 17:26:49 +02:00
Martin
ad4e5a8bc6 fix(instructeurs/procedures#index): counter not in sync 2022-04-04 16:28:25 +02:00
Kara Diaby
ec07ced968 modify avis controller 2022-03-31 15:48:17 +02:00
Martin
dbcf21a555 feat(archive): extract archive status management within job to simplify the main service as well as to isolate this part for a merge with exports csv/xslx [maybe?]
Update app/dashboards/archive_dashboard.rb

Co-authored-by: LeSim <mail@simon.lehericey.net>
2022-03-31 13:35:49 +02:00
Paul Chavard
c2812a7633 fix(api): hide deleted dossiers 2022-03-31 12:17:24 +02:00
Martin
7ec1021e00 feat(Archive.prepare_broader_reach): activate by default the archive button in the export dropdown. add a call to action to contact our support to enable the feature. increase estimated file size limit up to 100.gigabytes 2022-03-30 16:21:07 +02:00
Paul Chavard
7aacb7565c fix(dossiers): mark as read dossier on update_annotations 2022-03-22 09:19:24 +01:00
Paul Chavard
c530399eac feat(procedure): display revisions diffs 2022-03-17 10:26:38 +01:00
Paul Chavard
77c2187747 fix(instructeur): avoid n+1 in instructeur_dossier#show and user_dossier#show 2022-03-15 09:57:54 +01:00
Paul Chavard
0695ea322a refactor(instructeur): improuve dossiers list view 2022-03-11 14:06:34 +01:00
Paul Chavard
a50d07400e refactor(instructeur): cleanup destroy / restore routes 2022-03-11 14:06:34 +01:00
Paul Chavard
78bf1147d0 refactor(instructeur): use better fallback location 2022-03-11 13:55:36 +01:00
François Vantomme
d5cd0101c8 feat(footer): customize using custom views & locales 2022-03-10 17:31:20 +01:00
Paul Chavard
54b559364a feat(dossier): replace discarded with visible_by_administration 2022-03-10 14:29:40 +01:00
Paul Chavard
91caef0bfe fix(dossier): ensure submitted dossiers always have groupe instructeur 2022-03-02 16:57:12 +00:00
mfo
4346775169
Merge branch 'main' into US/fix-avis 2022-02-28 15:08:25 +01:00
Martin
48612028f4 fix(avis_controller#*): missing ACL 2022-02-28 14:24:41 +01:00
Martin
b808b4db00 fix(relation): avoid double association between procedure/procedure_revision/dossier_submitted_message 2022-02-25 14:01:18 +01:00
Martin
85a588541b feat(dossier_submitted_message): add a new system to customize the standby page (/merci) after an user created his folder. this is a basic feature that will come with more options asap
wip(dossier_created_hook): add tile to administrateurs/procedure#show in order to crud dossier_created_hook

refactor(css.utilities): remove merge helpers.scss within utils.scss (same purpose). use scss each for spacer modifiers

refactor(dossiers/_merci.html): extract partial _merci so we can re-use it in preview of dossier_created_hook.

feat(wip): current progress
2022-02-25 14:01:18 +01:00
Pierre de La Morinerie
a2028e115b controllers: fix crash on APIEntreprise::API::Error::TimedOut
In that case we want to display the nicely formatted error message to the
user, instead of a "Error 500" page.
2022-02-23 11:36:25 +01:00
Pierre de La Morinerie
56c2e57aee controllers: fix crash on APIEntreprise::API::Error::ServiceUnavailable
In that case we want to display the nicely formatted error message to the
user, instead of a "Error 500" page.
2022-02-23 11:31:41 +01:00
Pierre de La Morinerie
90b5e938e3 stats: fix Matomo cookie domains setting
It was exported to the GON as `cookie_domain`, but imported
by the tracking code as `cookieDomain`.
2022-02-15 11:55:24 +01:00
François Vantomme
cc6cb2ea30 feat(matomo): use env variables to set the domain 2022-02-15 09:25:23 +01:00
Paul Chavard
08030bcdb7 fix(attestation_template): handle attestation changes on procedures without revisions 2022-02-11 11:12:10 +01:00
Paul Chavard
e269077c40 refactor(attestation_template): cleanup relationships 2022-02-11 08:45:32 +01:00
Paul Chavard
12151acb99 Revert "Revert "feat(attestation): revise attestations""
This reverts commit 4e7733e571.
2022-02-08 16:22:59 +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
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
a94568e2ef modify procedures controller 2022-01-27 17:01:09 +01:00
Paul Chavard
4e7733e571 Revert "feat(attestation): revise attestations"
This reverts commit e413872530.
2022-01-25 18:26:34 +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
Paul Chavard
e413872530 feat(attestation): revise attestations 2022-01-19 18:00:37 +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
Kara Diaby
68b45ae31d modify instructeur procedures controller 2022-01-12 15:49:38 +01:00
Kara Diaby
006eac4240 modify controller 2022-01-12 15:49:37 +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
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
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
252eee272b feat(support#create): block with invisible captcha [avoid painful captcha] 2022-01-04 14:49:00 +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
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
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
537e6066d8 add Zones dashboard for superadmin 2021-12-23 19:07:42 +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
François Vantomme
14e0c68266 feat(api particulier): add MESRI field 2021-12-16 16:45:18 +01:00
simon lehericey
c7f7855f14 avoid phishing 2021-12-15 13:51:49 +01:00
maatinito
0a31c8bc79 refactor date_trunc queries using groupdate gem 2021-12-14 08:50:11 +01:00
maatinito
573b3d39e2 Fix date_trunc sql queries for timezoned forks 2021-12-14 08:50:09 +01:00
maatinito
9df0d98109 Fix csv download of stats
https://medium.com/@mitsun.chieh/activerecord-relation-with-raw-sql-argument-returns-a-warning-exception-raising-8999f1b9898a
2021-12-10 16:48:11 +01:00
simon lehericey
3bdf6b63d9 small wording fixes 2021-12-08 11:19:30 +01:00
François Vantomme
6ab8ac0662 feat (api particulier): add Pole emploi field 2021-12-08 10:36:25 +01:00
François Vantomme
2110ef072c feat(api particulier): add DGFiP field 2021-12-07 11:03:05 +01:00
Paul Chavard
2ba05bfb4f fix(dossier): use depose_at instead of en_construction_at 2021-12-06 15:49:17 +01:00
Martin
2778b42f1a feat(instructeurs/procedures#show): re-align tabs at the start of the container. re-align demander cell content verticaly 2021-12-06 07:20:01 +01:00
Martin
081d5094a9 feat(instructeurs/procedure/dossiers#extend_conservation): add extends duree conservation in action button list, also rewire this action for user [extend by procedure.duree_conservation_dans_ds by default] but force 1.month for instructeur. add new icon for standby based on https://en.wikipedia.org/wiki/Power_symbol 2021-12-06 07:20:01 +01:00
Martin
22531560d8 feat(tabs.expirants): re-order so it comes before deleted dossiers 2021-12-06 07:05:17 +01:00
Martin
1bb868714c fix(spec/lint/review): lint and fix spec of previous commits, also fix based on tchak feedback 2021-12-06 07:05:17 +01:00
Martin
d87f8b57cc feat(instructeurs/procedures#show): add dossier experiant in procedure#show 2021-12-06 07:05:17 +01:00
Martin
2dfbc70d41 feat(instructeur#dossiers_count_summary): add counter for expirants. ignore brouillon 2021-12-06 07:05:17 +01:00
Martin
f8a17b2cc4 feat(procedures#index): add dossiers-expirant to instructeur/procedure#index 2021-12-03 16:32:03 +01:00
Christophe Robillard
9341c787a1 administrateur can add zone to procedure 2021-12-02 19:24:26 +01:00
Pierre de La Morinerie
d524beee4e app: remove :instructeur_bypass_email_login_token from Flipper 2021-12-02 08:51:52 +01:00
Pierre de La Morinerie
ac07f05771 app: use Instructeur.bypass_email_login_token 2021-12-02 08:51:52 +01:00
Paul Chavard
46e2e34b89 fix(stats): remove super admin stats 2021-12-01 18:10:05 +01:00
Pierre de La Morinerie
28dfc6a1ba manager: save bypass_email_login_token to both column and feature 2021-11-30 13:41:25 +01:00
simon lehericey
c4cde500ce fix acsv 2021-11-30 09:42:45 +01:00
simon lehericey
5a0fb6237f 😭 AASM does not support keyword arguments
https://github.com/aasm/aasm/issues/672
2021-11-30 09:42:45 +01:00
Pierre de La Morinerie
184a401182 app: rename new_administrateur to administrateurs 2021-11-30 08:49:38 +01:00
simon lehericey
a0c0520502 avoid redirection to a deleted user 2021-11-29 15:27:17 +01:00
Kara Diaby
23677956f3 modify controller 2021-11-29 11:34:31 +01:00
Martin
cf82c030e8 hotfix(scoping): try to avoid requesting archived: false when using termine scope, use state_termine instead 2021-11-26 15:09:53 +01:00
kara Diaby
eaac293da3 add a new tab traités on user dossiers 2021-11-26 09:45:13 +01:00
Martin
fdf0f18fda fix(i18n): wrap text under i18n.t
i18n(france_connect/*): replace wording with i18n

fix(lint): i18n key issue

secu(views/france_connect/particulier/merge.html.haml): sanitize france_connect_email just in case

fix(brakeman): sanitize FCI.email_france_connect when used with html_safe via an I18n.t, also add exception to brakeman
2021-11-25 17:34:37 +01:00
Martin
21894d0a0a feat(france_connect/particulier#callback): in case the FC email exists as an DC account which is an instructor or and administrator, returns early to new_session_path so he can connect with this existing account 2021-11-25 17:34:36 +01:00
Martin
ff073f8884 Add confirmation by email when merging DC/FC accounts
feat(fci.confirmation_code): add confirmation code to france_connect_informations

feat(user_mailer.france_connect_confirmation_code): add confirmation by email mail method/preview/spec, pointing to merge_mail_with_existing_account (reuse existing method)

feat(mail_merge): mail merge

feat(merge.cannot_use_france_connect): same behaviour as callback

clean(fci.confirmation_code): use same token for mail validation as merge

feat(resend_france_connect/particulier/merge_confirmation): resend email with link. also enhance some trads, cleanup halfy finished refacto

clean(tech): finalize story by plugging merge_with_new_account to email validation

fix(deadspec): was removed

fix(spec): broken after last refactoring

lint(rubocop): space before parenthesis

lint(haml-lint): yoohoooo space before =

fix(lint): scss now :D

Update app/assets/stylesheets/buttons.scss

cleanup

feat(france_connect): re-add confirm by email, with an option for confirmation by email instead of only confirmation by email

fixup! Add confirmation by email when merging DC/FC accounts

fix(lint): haml_spec failure
2021-11-25 17:34:34 +01:00
mfo
e7d9d047fe
Merge branch 'main' into 6649-etq-usager-instructeur-rendre-la-suppression-plus-visible 2021-11-24 14:07:32 +01:00
Paul Chavard
758e7d68e6 fix(graphql): fix and improuve query parsing for logs 2021-11-24 13:23:05 +03:00
simon lehericey
c5097451ef add redirect 2021-11-23 14:17:59 +01:00
simon lehericey
5234a1854c manage AgentConnect callback 2021-11-23 14:17:59 +01:00
simon lehericey
898df449d4 redirect to AgentConnect 2021-11-23 14:17:59 +01:00
simon lehericey
d2432e34eb AgentConnect UI 2021-11-23 14:17:59 +01:00
mfo
49bb12a70e
Merge branch 'main' into 6649-etq-usager-instructeur-rendre-la-suppression-plus-visible 2021-11-23 11:05:51 +01:00
Pierre de La Morinerie
859a147c49 api: return error cause on parse error
Currently, when a query can't be parsed, the error is:
- logged to Sentry (which is useless to us),
- returned as a generic 'Internal Server Error' (which is useless to the
  user who made the query).

With this commit, the error is instead ignored from our logs (because it
is a user error), but the parse error details are returned to the user,
with the following format:

> {'errors': [{'message': 'Parse error on ")" (RPAREN) at [3, 23]'}]}
2021-11-19 15:15:10 +01:00
Martin
3d1533dee9 feat(users/dossiers?statut=dossiers-expirant): add dossiers-expirant tab 2021-11-19 15:14:39 +01:00
Paul Chavard
ae09b37e72 fix(champs): save departement info on champ commune 2021-11-17 14:52:47 +03:00
mfo
82b23b92c0
Merge branch 'main' into 6624/etq-instructeur-je-souhaite-supprimer-des-messages-envoyes-par-erreur 2021-11-17 05:41:56 +01:00
Paul Chavard
716a859c93 fix(profile): prevent crashing on renew token action 2021-11-16 20:01:56 +03:00
Paul Chavard
e74d599042 feat(procedure): remove duree_conservation_dossiers_hors_ds 2021-11-16 19:55:56 +03:00
Paul Chavard
65e59b8dcd fix(procedure): allow to modify duree_conservation_dossiers_dans_ds after publication 2021-11-16 19:55:56 +03:00
mfo
1d174df2ec
Merge branch 'main' into 6624/etq-instructeur-je-souhaite-supprimer-des-messages-envoyes-par-erreur 2021-11-16 16:37:15 +01:00
Martin
f0950b592b clean(CommentaireService): extract soft delete within controller. returning an instance with an error[:base] is not persisted with validation : avoid poluting stuff 2021-11-16 16:13:11 +01:00
Paul Chavard
3400c4c628 fix(champs): attach piece justificative 2021-11-16 17:57:41 +03:00
Paul Chavard
7914775809 feat(routage): administrateur can disable routage
fix #6627
2021-11-16 11:49:51 +03:00
Martin
4042d51d1a tech(lint): rubocopify 2021-11-15 14:17:57 +01:00
Martin
d4c74b5621 feat(rc.1): refine with better translations, better design 2021-11-15 14:15:05 +01:00
Martin
3b78a9d81a feat(rc): first stable 2021-11-15 13:53:32 +01:00
Martin
8b931a57d4 feat(CommentairesController#destroy): implement destroy endpoint using CommentaireService 2021-11-15 13:18:10 +01:00
simon lehericey
17d131b3cc add has_may requested_merge_from 2021-11-04 16:10:09 +01:00
simon lehericey
9041e201e8 one merge at a time 2021-11-04 16:10:09 +01:00
simon lehericey
b160086cc5 update update_email to allow merge 2021-11-04 16:10:09 +01:00
simon lehericey
652b8367be accept or refuse merge 2021-11-04 16:10:09 +01:00
simon lehericey
894e8fdd47 move update_email check to before_action 2021-11-04 16:10:09 +01:00
Paul Chavard
7ef73f13e4 fix(grope_instructeur): can not destroy groupe_instructeur with discarded dossiers 2021-11-02 12:15:24 +01:00
Paul Chavard
3c2515ce6d feat(graphql): add graphql_operation to rails logs 2021-11-02 12:02:00 +01:00
Paul Chavard
da49a6447f refactor(repetition): optimize and add a transaction around repetition add row 2021-10-28 14:54:33 +02:00
Paul Chavard
c4b93f8d4a fix(groupe_instructeur): unfollow dossiers when removed from groupe instructeur 2021-10-28 14:45:52 +02:00
simon lehericey
c725999582 move merge method to user 2021-10-28 14:39:13 +02:00
Paul Chavard
d659595cde fix(typo): addresse -> adresse 2021-10-27 18:59:18 +02:00
Paul Chavard
8154daf847 refactor(drop_down_list_champ): other option 2021-10-27 12:00:39 +02:00
kara Diaby
dc35d9521f add other option to liste deroulante champ 2021-10-26 16:11:15 +02:00
Paul Chavard
d308448f02 feat(type_de_champ): add secondary label and description do linked drop downs 2021-10-26 12:18:01 +02:00
Paul Chavard
1561ea82f6 fix(transfer): manually nullify staled transfers references 2021-10-21 13:54:26 +02:00
lydiasan
6f9c3abfbc i18n: display language selector on non-french accept-languages 2021-10-19 16:41:36 +02:00
simon lehericey
d19ad2840c rename preexisting to targeted, remove duplicated test 2021-10-19 16:12:42 +02:00
simon lehericey
52b7e85954 merge administrateur in user_controller 2021-10-19 16:12:42 +02:00
simon lehericey
44c880adc4 allow instructeur and administrateur to change their email to legit domain (#6550) 2021-10-19 15:54:57 +02:00
Paul Chavard
8fa544e176 feat(manager): bring back add administrateur 2021-10-19 12:06:31 +02:00
simon lehericey
f54dfe6ead Do not raise error if user is nil
I do not get when it happens
2021-10-19 11:21:24 +02:00
simon lehericey
bb83fd2f18 To make an old test work, no idea 2021-10-14 14:47:50 +02:00
simon lehericey
933d7b8c8d merge with another preexisting account 2021-10-14 14:47:50 +02:00
simon lehericey
ce40e1127d merge with another new account 2021-10-14 14:47:50 +02:00
simon lehericey
19f81b594b merge with an existing account by using the password 2021-10-14 14:47:50 +02:00
simon lehericey
218e4633a9 securely retrieve fci 2021-10-14 14:47:50 +02:00
simon lehericey
f7299da1e7 launch merge process if an unlinked DS account with the same email exists 2021-10-14 14:47:50 +02:00
simon lehericey
f6879eba60 associate_user take a target email 2021-10-14 14:47:50 +02:00
simon lehericey
6826bf03b0 Sign in with a user linked by france connect sub (openid)
instead of looking linked user by email because :

- follows FC recommendation to fetch ds account by openid
- the email is not a valid key as many user can share the same FCI email.

The following scenario is now working

A user A (email: 1@mail.com) uses FC to connect to DS
=> It is connected as 1@mail.com

Another user B (email: generic@mail.com) uses FC to connect
=> It is connected as generic@mail.com

The first user A change its FC email to generic@mail.com and connect to DS
=> It is still connected as 1@mail.com
2021-10-14 14:47:50 +02:00
simon lehericey
06dee2e023 refactor controller to avoid return 2021-10-14 14:47:50 +02:00
simon lehericey
5aaf46258a remove obsolete devise scope 2021-10-14 14:47:50 +02:00
simon lehericey
87de9e38c6 allow draft to be saved with invalid cnaf champ 2021-10-12 14:27:20 +02:00
simon lehericey
7072993721 a form can upload numero_allocataire and code_postal 2021-10-12 14:27:20 +02:00
simon lehericey
77d14d4a60 forbid admin merge yet 2021-10-07 15:51:31 +02:00
simon lehericey
5009c583ea Add notice when merging account 2021-10-07 15:51:31 +02:00
simon lehericey
a480b31eb5 merge expert 2021-10-07 15:51:31 +02:00
simon lehericey
136f29524e merge instructeur 2021-10-07 15:51:31 +02:00
simon lehericey
9a6a53349f simple cases when the preexisting targeted account does not have instructeur or profile profile 2021-10-07 15:51:31 +02:00
Paul Chavard
4a947f9135 feat(manager): add become administrateur button in manager (with 24h expiration) 2021-10-07 11:32:12 +02:00
kara Diaby
9c9eeb8e76 modify groupe instructeurs controller$ 2021-10-05 15:37:29 +02:00
kara Diaby
6d89d914e2 modify expert avis controller 2021-10-05 15:00:21 +02:00
simon lehericey
f662b28baf update identity_updated_at column when user identity change 2021-10-05 12:05:43 +02:00
Pierre de La Morinerie
f854e3af63 controllers: use ACSV to import groupe instructeurs
Unlike `CSV`, `ACSV` auto-detect the file encoding and separator type.
2021-10-05 10:58:15 +02:00
Peng-Fei DONG
dee536fca1 app: localize CSV import for groupe instructeurs 2021-10-05 10:58:15 +02:00
simon lehericey
64351d0287 [Fix #6504] Fix exception raised when deleting a transfer 2021-10-01 12:11:03 +02:00
Paul Chavard
7deedf8245 feat(refactor): unify dossiers header 2021-09-27 15:06:17 +02:00
Paul Chavard
357c684688 feat(routage): self managing instructeurs 2021-09-27 15:06:17 +02:00
Paul Chavard
5933194149 feat(log): stop logging user emails
fix #6485
2021-09-27 14:56:00 +02:00
simon lehericey
1446660ca3 an api_particulier_token change erases previous api_particulier_sources 2021-09-21 11:21:10 -05:00
simon lehericey
2e1bed8748 an admin can save its sources 2021-09-21 11:21:10 -05:00
Pierre de La Morinerie
eef90efd49 app: fix exception during password reset when the token has expired 2021-09-21 10:30:09 -05:00
simon lehericey
7239657a75 [Fix #6481] a user see its waiting transfers 2021-09-20 13:58:11 +02:00
simon lehericey
c34476a766 a user can transfer all its dossier 2021-09-20 13:58:11 +02:00
Paul Chavard
0c5c8faf16 feat(routage): enable routage for everyone 2021-09-18 11:22:35 +02:00
Paul Chavard
8b4bef2816 refactor(routage): simplify goupe_instructeur assign code 2021-09-18 11:21:26 +02:00
simon lehericey
2c13f70cd5 redirect to sources after updating token 2021-09-17 13:50:23 +02:00
simon lehericey
5dbd81ebeb show api particulier sources 2021-09-17 13:50:23 +02:00
Pierre de La Morinerie
715b5ea6d8 i18n: move controller keys to the proper scope 2021-09-16 07:59:19 -05:00
Pierre de La Morinerie
e6b044531d i18n: fix invalid i18n-tasks-hint 2021-09-16 07:51:56 -05:00
simon lehericey
1d06c15ac0 save api particulier scopes 2021-09-16 09:49:16 +02:00
simon lehericey
7ee360df30 add logic to detect empty scopes 2021-09-16 09:09:34 +02:00
Pierre de La Morinerie
745e19bb8e localize 2021-09-16 09:07:47 +02:00
simon lehericey
ee6d19e3ee an admin can save it's api particulier token
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:56:42 +02:00
simon lehericey
4c0dd43055 add jetons particulier index page
Co-authored-by: François VANTOMME <akarzim@gmail.com>
2021-09-15 14:37:04 +02:00
Peng-Fei DONG
1979c44f9c set OTP: Enable or Disable 2021-09-09 10:25:15 -05:00
Pierre de La Morinerie
e5f449b595 devise: unify password reset views
By default, Devise will look for views:

1. First in `views/resource/passwords/…`,
2. Then in `views/devise/passwords/…` if not found.

By moving the views to `views/devise`, we avoid having a partial in
`views/shared` that we need to include manually, and instead let Devise
do the job automatically.
2021-09-09 09:40:40 -05:00
Pierre de La Morinerie
80f9d4adc0 devise: use password_strength component in SuperAdmin::PasswordsController 2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
62e4f7ee32 devise: use password_complexity in User::PasswordsController
This fixes the password strength meter no longer being displayed when
an admin changes their password.
2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
428ca8755f app: add a password_complexity component
This component will replace the previous `password_field` component.
2021-09-09 09:40:39 -05:00
Pierre de La Morinerie
02bdfef893 devise: cleanup Users::PasswordController 2021-09-09 08:03:34 -05:00
Paul Chavard
3235f42a63 feat(dossier): add dossier transfers UI 2021-09-08 15:10:43 +02:00
Paul Chavard
44eb0ada4f fix(i18n): add Kosovo to countries list
Kosovo is not part of ISO 3166 as of time of writing. https://en.wikipedia.org/wiki/ISO_3166-2:RS#cite_ref-1
2021-09-08 12:11:25 +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
34b1418868 feat(i18n): save locale on user 2021-09-07 09:51:23 +02: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
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
Paul Chavard
a3cc072bbd feat(i18n): translate countries selector 2021-08-31 13:15:26 +02:00
Paul Chavard
3b6528decf feat(i18n): enable localization by query param
Providing a query param ("locale") will enable localization. A language picker will be shown once
localization is activated. Locale is stored in a cookie "locale".
2021-08-24 12:42:40 +02:00
Ismael MOUSSA S. (T0194673)
330333aac4 6407 - Fix flash message typo in new administrateur/groupe instructeurs controller and its related spec 2021-08-20 20:10:44 +02:00
kara Diaby
ae0a3b9dd5 modify procedures controller instructeur 2021-08-04 11:35:06 +02:00
kara Diaby
69393c2921 modify groupe instructeur controller 2021-07-27 19:38:22 +02:00