Commit graph

100 commits

Author SHA1 Message Date
Pierre de La Morinerie
ac07f05771 app: use Instructeur.bypass_email_login_token 2021-12-02 08:51:52 +01:00
lydiasan
6f9c3abfbc i18n: display language selector on non-french accept-languages 2021-10-19 16:41:36 +02:00
simon lehericey
19f81b594b merge with an existing account by using the password 2021-10-14 14:47:50 +02:00
Paul Chavard
5933194149 feat(log): stop logging user emails
fix #6485
2021-09-27 14:56:00 +02:00
Paul Chavard
34b1418868 feat(i18n): save locale on user 2021-09-07 09:51:23 +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
Pierre de La Morinerie
831672391e app: use a long-lived cookie for CSRF token
See the ADR document for rationale.
2021-07-20 11:11:52 +02:00
Pierre de La Morinerie
09933454ff app: improve InvalidAuthenticityToken logging
- Log on all controllers
- Improve description of the controller action involved
- Ignore Safari bogus requests
2021-07-06 12:42:01 +02:00
Pierre de La Morinerie
a99a6cc49f controllers: use default Rails settings for protecting against forgery
Rails uses `config.action_controller.allow_forgery_protection` to
enable or disable forgery protection globaly.

This is disabled for tests by default. So our custom config is not
required.
2021-06-22 13:21:55 +02:00
François Vantomme
bc6d5aca0e Fix (Sentry): prefer Rails secrets over ENV variables 2021-05-27 11:12:27 +02:00
lydiasan
e85dcf4c58
Update app/controllers/application_controller.rb
Co-authored-by: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
2021-05-25 13:32:26 +02:00
lydiasan
71069c0e1b correction de la variable d'environnement 'LOCALIZATION_ENABLED' 2021-05-25 10:05:52 +02:00
lydiasan
42153d1d37 ajout du selecteur de langue 2021-05-12 16:30:35 +02:00
simon lehericey
b87a691176 use env for localization to avoid db round trip 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
kara Diaby
d2ab2debb6 add expert logic 2021-03-18 11:27:51 +01:00
Paul Chavard
1c811083c0 Cleanup feature flags usage 2021-03-04 11:06:04 +01:00
Pierre de La Morinerie
334e50d4f8 views: remove old design's navbars 2021-02-02 15:33:09 +01:00
Paul Chavard
41c3a98d7d Update Raven references to use Sentry 2021-01-28 19:46:36 +01:00
Christophe Robillard
5562e65bf3 refacto: rename administration to super_admin 2020-11-05 16:03:55 +01:00
Christophe Robillard
2a0ebd062a enable 2FA for manager
when trying to access manager, if superadmin did'nt enable otp, he/she is redirected to a page to enable 2FA. When superadmin is enabling 2FA, he has to to scan a qrcode with the 2FA application client. And afterwards, the superadmin has to log in with email, password and OTP code.
2020-11-05 16:03:55 +01:00
simon lehericey
d82d1132c2 Remove rack_mini_profiler from prod as it could show env var and force us to allow unsafe_eval and script in csp 2020-10-30 17:08:31 +01:00
kara Diaby
9207cc5aa5 Ajoute un flag pour qu'un expert ne puisse pas inviter une autre personne à donner son avis sur un dossier 2020-10-02 18:57:29 +02:00
Judith
af25fdd77c gem http_accept_language installed and (de)activable with feature flag 2020-08-27 16:15:01 +02:00
Pierre de La Morinerie
812aef978d controllers: rename pundit_user to current_account
It makes epxlicity what is the name of the structure returned by
`pundit_user`: not an actual User, but an `account` structure.
2020-06-24 15:42:30 +02:00
Christophe Robillard
d46bcecc51 improve code readbility 2020-03-20 10:41:36 +01:00
Christophe Robillard
775cc11d30 include store_location_extension for all controllers 2020-03-20 10:41:36 +01:00
Christophe Robillard
884de51b94 Revert "Revert "go to procedure after cliking link""
This reverts commit 952bae32fe.
2020-03-20 10:41:36 +01:00
Christophe Robillard
952bae32fe Revert "go to procedure after cliking link"
This reverts commit 795eabb1ea.
2020-03-18 14:45:39 +01:00
Christophe Robillard
795eabb1ea go to procedure after cliking link
even for an instructeur which is not signed in and unstrusted
2020-03-18 11:16:19 +01:00
Paul Chavard
ae2cfdd44e Update browser gem
`modern?` method was removed in version 4
2020-03-17 11:25:20 +01:00
Paul Chavard
14295db9ad Revert "Revert "Merge pull request #4552 from tchak/champ-communes""
This reverts commit 4373cb22cb.
2020-01-14 18:46:07 +01:00
clemkeirua
4373cb22cb Revert "Merge pull request #4552 from tchak/champ-communes"
This reverts commit 4cec26f73a, reversing
changes made to 0ef25ef36c.
2020-01-13 16:26:27 +01:00
Paul Chavard
22aa2d4ee0 Make all location champs autocomplete 2020-01-07 11:52:51 +01:00
Paul Chavard
7b947feae4 Rename demarche archivée to demarche close 2019-11-28 15:07:16 +01:00
Pierre de La Morinerie
68f5aae99d autosave: add feature test 2019-11-21 14:00:06 +01:00
simon lehericey
dae7a3bfd0 [fix #4529] Log user email in manager space 2019-11-19 12:15:03 +01:00
simon lehericey
5643e671a0 Code use user.active? 2019-11-05 14:10:39 +01:00
simon lehericey
8ae592fe25 [fix #4361] administrateur active 2019-10-24 18:32:48 +02:00
simon lehericey
5143d341ec Admin: 1 query for crips 2019-10-08 09:53:40 +02:00
Paul Chavard
adfa80142a Cleanup application_controller and current_user 2019-09-17 12:37:37 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
simon lehericey
4142acf8d3 Replace administrateur devise methods in app 2019-08-14 15:06:16 +02:00
Paul Chavard
0969b1f85f Enable email_login_token for all gestionnaires 2019-08-14 12:53:51 +01:00
Pierre de La Morinerie
4e9895c11b app: mark the contact forms as not sensitive to trusted tokens
Instructeurs waiting for a confirmation token should be able to
access the contact form (especially to ask for help).

Fix #4198
2019-08-13 19:48:11 +02:00
simon lehericey
c8a7bde5e0 Replace instructeur devise methods in app 2019-08-13 15:15:16 +02:00
simon lehericey
e3fd1cc33a Remove weird switch_devise_profile_service 2019-08-13 15:15:16 +02:00
simon lehericey
3fde2a6f70 Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
Paul Chavard
02904f55b1 Fix champ policy 2019-08-01 16:41:53 +02:00
Paul Chavard
fc75580a3c Start using pundit 2019-07-30 18:09:28 +02:00