diff --git a/README.md b/README.md index 95c82ced9b75eafa7a593de823cfe95e43e9d63b..6f193c05f02535a57de853642141f1c5960827b6 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Default formatter of IntellJ/PyCharm. Not checked in CI. #### Python -_To run functional tests: make sure your `settings.DEFAULT_TEST_BROWSER` is properly set, download the proper webdriver for your version of [Chrome](https://chromedriver.chromium.org/) or [Firefox](https://github.com/mozilla/geckodriver/releases), make sure `chrome`/`firefox` and `chromedriver`/`geckodriver` are registered in your OS path (or alternatively set absolute path for them in settings `BROWSER_BINARY_PATH`, `DEFAULT_CHROMEDRIVER_PATH`/`DEFAULT_GECKODRIVER_PATH`)._ +_To run functional tests: make sure your `settings.DEFAULT_TEST_BROWSER` is properly set, download the proper webdriver for your version of [Chrome](https://chromedriver.chromium.org/) or [Firefox](https://github.com/mozilla/geckodriver/releases), make sure `chrome`/`firefox` and `chromedriver`/`geckodriver` are registered in your OS path (or alternatively set absolute path for them in settings `BROWSER_BINARY_PATH`, `CHROMEDRIVER_PATH`/`GECKODRIVER_PATH`)._ Run all tests diff --git a/ftl/account/locale/fr/LC_MESSAGES/django.po b/ftl/account/locale/fr/LC_MESSAGES/django.po index c5ca0af4714a3cd1ea104e8e3b06ad1a9bff8f61..5bd94de177f2455f91058ab3646a84a0dc076232 100644 --- a/ftl/account/locale/fr/LC_MESSAGES/django.po +++ b/ftl/account/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-22 12:00+0200\n" +"POT-Creation-Date: 2020-07-30 16:36+0000\n" "PO-Revision-Date: 2020-06-22 12:02+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -18,31 +18,29 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.3.1\n" -#: .\account\forms.py:17 +#: account/forms.py:17 msgid "Email is already used by someone else." msgstr "Cette adresse est déjà utilisée." -#: .\account\forms.py:26 .\account\templates\account\account_base.html:88 -#: .\account\templates\account\account_delete.html:44 +#: account/forms.py:26 account/templates/account/account_base.html:88 +#: account/templates/account/account_delete.html:44 msgid "Password" msgstr "Mot de passe" -#: .\account\forms.py:38 +#: account/forms.py:38 msgid "Incorrect password" msgstr "Mot de passe incorrect" -#: .\account\templates\account\account_activity.html:8 -#: .\account\templates\account\account_base.html:93 +#: account/templates/account/account_activity.html:8 +#: account/templates/account/account_base.html:93 msgid "Account activity" msgstr "Activité du compte" -#: .\account\templates\account\account_activity.html:10 -msgid "" -"See the last ten successful connections to your account." -msgstr "" -"Consultez les dix dernières connexions réussies à votre compte." +#: account/templates/account/account_activity.html:10 +msgid "See the last ten successful connections to your account." +msgstr "Consultez les dix dernières connexions réussies à votre compte." -#: .\account\templates\account\account_activity.html:14 +#: account/templates/account/account_activity.html:14 #, python-format msgid "" "\n" @@ -57,39 +55,31 @@ msgstr "" "à votre mot de passe. Modifiez-le pour protéger " "votre compte." -#: .\account\templates\account\account_activity.html:23 -msgid "current device" -msgstr "appareil actuel" - -#: .\account\templates\account\account_base.html:5 +#: account/templates/account/account_base.html:5 msgid "Account management" msgstr "Mon compte" -#: .\account\templates\account\account_base.html:58 +#: account/templates/account/account_base.html:58 msgid "Return to app" msgstr "Revenir à l'application" -#: .\account\templates\account\account_base.html:63 +#: account/templates/account/account_base.html:63 msgid "Settings" msgstr "Paramètres" -#: .\account\templates\account\account_base.html:98 +#: account/templates/account/account_base.html:98 msgid "Two factor authentication" msgstr "Authentification à deux facteurs" -#: .\account\templates\account\account_base.html:104 +#: account/templates/account/account_base.html:104 msgid "Data import / export" msgstr "Import / export des données" -#: .\account\templates\account\account_base.html:107 +#: account/templates/account/account_base.html:107 msgid "Delete account" msgstr "Supprimer mon compte" -#: .\account\templates\account\account_base.html:111 -msgid "Paper Matter settings" -msgstr "Paramètres de Paper Matter" - -#: .\account\templates\account\account_base.html:123 +#: account/templates/account/account_base.html:123 msgid "" "\n" " Paper Matter, carefully crafted by\n" @@ -103,11 +93,11 @@ msgstr "" "href=\"https://www.exotic-matter.fr\">Exotic Matter en France." -#: .\account\templates\account\account_delete.html:9 +#: account/templates/account/account_delete.html:9 msgid "Your are about to delete your Paper Matter account" msgstr "Vous êtes sur le point de supprimer votre compte Paper Matter" -#: .\account\templates\account\account_delete.html:16 +#: account/templates/account/account_delete.html:16 #, python-format msgid "" "\n" @@ -130,7 +120,7 @@ msgstr "" "ajoutez lui les permissions \"Statut équipe\" et \"Statut super-utilisateur" "\". Rafraichissez ensuite cette page pour supprimer ce compte." -#: .\account\templates\account\account_delete.html:26 +#: account/templates/account/account_delete.html:26 msgid "" "Every document and folders will be immediately marked for deletion and the " "account\n" @@ -144,7 +134,7 @@ msgstr "" "pour vous inscrire ne sera pas réutilisable pour la création d'un nouveau " "compte." -#: .\account\templates\account\account_delete.html:34 +#: account/templates/account/account_delete.html:34 #, python-format msgid "" "Please export your documents before " @@ -155,15 +145,15 @@ msgstr "" "Pensez à exporter vos documents avant de " "continuer car cette action est irréversible." -#: .\account\templates\account\account_delete.html:46 +#: account/templates/account/account_delete.html:46 msgid "Please provide your account password to continue" msgstr "Veuillez indiquer votre mot de passe pour continuer" -#: .\account\templates\account\account_delete.html:61 +#: account/templates/account/account_delete.html:61 msgid "Delete my account immediately" msgstr "Supprimer mon compte immédiatement" -#: .\account\templates\account\account_delete_warn_body.txt:5 +#: account/templates/account/account_delete_warn_body.txt:5 msgid "" "As requested, your Paper Matter account has been purged and deleted.\n" "We are sorry that the service didn't meet your expectations :(.\n" @@ -171,15 +161,15 @@ msgstr "" "Suite à votre demande, votre compte Paper Matter a été vidé et supprimé.\n" " Nous sommes désolés que le service n'ait pas été à la hauteur :(.\n" -#: .\account\templates\account\account_delete_warn_subject.txt:5 +#: account/templates/account/account_delete_warn_subject.txt:5 msgid "Your Paper Matter account has been deleted" msgstr "Votre compte Paper Matter a été supprimé" -#: .\account\templates\account\account_email.html:8 +#: account/templates/account/account_email.html:8 msgid "Change your email" msgstr "Modifier votre email" -#: .\account\templates\account\account_email.html:10 +#: account/templates/account/account_email.html:10 msgid "" "Keep your email updated. You might receive important notice about your " "account." @@ -187,7 +177,7 @@ msgstr "" "Garder votre adresse email à jour. Vous pouvez recevoir des informations " "importantes à propos de votre compte." -#: .\account\templates\account\account_email.html:13 +#: account/templates/account/account_email.html:13 msgid "" "\n" " An confirmation email will be sent to your new address. " @@ -201,15 +191,15 @@ msgstr "" "cliquer sur le lien contenu dans l'email pour valider votre nouvelle " "adresse. Attention, ce lien expirera dans 10 minutes." -#: .\account\templates\account\account_email.html:21 +#: account/templates/account/account_email.html:21 msgid "New email" msgstr "Nouvelle adresse email" -#: .\account\templates\account\account_email.html:34 +#: account/templates/account/account_email.html:34 msgid "Next" msgstr "Suivant" -#: .\account\templates\account\account_email_change_body.txt:5 +#: account/templates/account/account_email_change_body.txt:5 msgid "" "\n" "An request has been made to change your email linked to your Paper Matter " @@ -220,7 +210,7 @@ msgstr "" "Vous avez demandé à modifier votre adresse email relié à votre compte Paper " "Matter. Merci de cliquer sur le lien suivant pour valider.\n" -#: .\account\templates\account\account_email_change_body.txt:12 +#: account/templates/account/account_email_change_body.txt:12 #, python-format msgid "" "\n" @@ -229,11 +219,11 @@ msgstr "" "\n" "Ce lien expirera dans %(expiration_minutes)s minutes.\n" -#: .\account\templates\account\account_email_change_subject.txt:5 +#: account/templates/account/account_email_change_subject.txt:5 msgid "Validate your new email!" msgstr "Valider votre nouvelle adresse email !" -#: .\account\templates\account\account_email_warn_body.txt:5 +#: account/templates/account/account_email_warn_body.txt:5 msgid "" "\n" "Someone requested to change the email address linked to your Paper Matter " @@ -245,15 +235,15 @@ msgstr "" "compte Paper Matter. Si vous n'en êtes pas l'origine, changer IMMÉDIATEMENT " "votre mot de passe.\n" -#: .\account\templates\account\account_email_warn_subject.txt:5 +#: account/templates/account/account_email_warn_subject.txt:5 msgid "Account security: notice of email change" msgstr "Sécurité: notification de changement de l'adresse email" -#: .\account\templates\account\account_import_export.html:8 +#: account/templates/account/account_import_export.html:8 msgid "Import or export your documents" msgstr "Importez ou exportez vos documents" -#: .\account\templates\account\account_import_export.html:10 +#: account/templates/account/account_import_export.html:10 msgid "" "You can download the Import - Export software to easily import or export all " "your documents and their related metadata (title, note, date...)." @@ -262,11 +252,11 @@ msgstr "" "exporter facilement tous vos documents et leurs métadonnées associées " "(titre, note, date...)." -#: .\account\templates\account\account_import_export.html:17 +#: account/templates/account/account_import_export.html:17 msgid "Download import - export software" msgstr "Télécharger le logiciel d'import / export" -#: .\account\templates\account\account_index.html:24 +#: account/templates/account/account_index.html:24 msgid "" "\n" " Keep your contact email up-to-date\n" @@ -275,7 +265,7 @@ msgstr "" "\n" "Gardez votre email de contact à jour" -#: .\account\templates\account\account_index.html:37 +#: account/templates/account/account_index.html:37 msgid "" "\n" " For more security: update your password " @@ -285,7 +275,7 @@ msgstr "" "\n" "Pour plus de sécurité : changez régulièrement de mot de passe" -#: .\account\templates\account\account_index.html:41 +#: account/templates/account/account_index.html:41 msgid "" "\n" " For more security: update your password " @@ -296,11 +286,11 @@ msgstr "" "Pour plus de sécurité : changez régulièrement de mot de passe et activez le " "2FA" -#: .\account\templates\account\account_password.html:8 +#: account/templates/account/account_password.html:8 msgid "Change your password" msgstr "Modifier votre mot de passe" -#: .\account\templates\account\account_password.html:12 +#: account/templates/account/account_password.html:12 msgid "" "\n" " Your account is protected with your password and Two " @@ -312,7 +302,7 @@ msgstr "" "Votre compte est protégé par votre mot de passe et l'authentification à deux " "facteurs. La sécurité de votre compte est optimale." -#: .\account\templates\account\account_password.html:17 +#: account/templates/account/account_password.html:17 #, python-format msgid "" "\n" @@ -329,7 +319,7 @@ msgstr "" "l'authentification à deux facteurs pour augmenter la sécurité de votre " "compte." -#: .\account\templates\account\account_password.html:25 +#: account/templates/account/account_password.html:25 #, python-format msgid "" "\n" @@ -344,23 +334,23 @@ msgstr "" "aléatoires en incluant des caractères spéciaux (!#%%?) ou une phrase " "comprenant 5 ou 6 mots séparés par un espace est suffisant." -#: .\account\templates\account\account_password.html:34 +#: account/templates/account/account_password.html:34 msgid "Old password" msgstr "Ancien mot de passe" -#: .\account\templates\account\account_password.html:46 +#: account/templates/account/account_password.html:46 msgid "New password" msgstr "Nouveau mot de passe" -#: .\account\templates\account\account_password.html:58 +#: account/templates/account/account_password.html:58 msgid "Confirm new password" msgstr "Confirmer nouveau mot de passe" -#: .\account\templates\account\account_password.html:68 +#: account/templates/account/account_password.html:68 msgid "Update my password" msgstr "Modifier votre mot de passe" -#: .\account\templates\account\account_password_warn_body.txt:4 +#: account/templates/account/account_password_warn_body.txt:4 msgid "" "\n" "The password of your Paper Matter account has been updated. If you did not " @@ -372,30 +362,30 @@ msgstr "" "n’avez pas demandé ce changement, veuillez IMMÉDIATEMENT réinitialisez votre " "mot de passe en utilisant la page \"Mot de passe oublié\".\n" -#: .\account\templates\account\account_password_warn_subject.txt:5 +#: account/templates/account/account_password_warn_subject.txt:5 msgid "Account security: notice of password change" msgstr "Sécurité du compte : avis de changement de mot de passe" -#: .\account\views.py:73 +#: account/views.py:73 msgid "A confirmation email has been sent." msgstr "Un email de confirmation a été envoyé." -#: .\account\views.py:130 +#: account/views.py:130 msgid "Email successfully updated." msgstr "L'adresse a été mise à jour." -#: .\account\views.py:131 +#: account/views.py:131 msgid "The link expired. Please try again." msgstr "Le lien de validation a expiré. Merci de réessayer." -#: .\account\views.py:132 +#: account/views.py:132 msgid "Could not validate your email. Please try again." msgstr "Impossible de valider votre adresse. Veuillez réessayer." -#: .\account\views.py:167 +#: account/views.py:167 msgid "Password updated!" msgstr "Mot de passe mis à jour !" -#: .\account\views.py:201 +#: account/views.py:201 msgid "Your account was deleted." msgstr "Votre compte a été supprimé." diff --git a/ftl/core/locale/fr/LC_MESSAGES/django.po b/ftl/core/locale/fr/LC_MESSAGES/django.po index 84bf527c3475a9eb361d90acfa4c01e3af3eb23a..1324188e54d6a70467eeebaf7f5eb6a25d38ba61 100644 --- a/ftl/core/locale/fr/LC_MESSAGES/django.po +++ b/ftl/core/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-28 14:30+0200\n" +"POT-Creation-Date: 2020-07-30 16:36+0000\n" "PO-Revision-Date: 2020-04-28 14:35+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -18,27 +18,27 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.3\n" -#: .\core\admin.py:20 +#: core/admin.py:20 msgid "Personal info" msgstr "Info personnelles" -#: .\core\admin.py:22 +#: core/admin.py:22 msgid "Permissions" msgstr "Permissions" -#: .\core\admin.py:33 +#: core/admin.py:33 msgid "Important dates" msgstr "Dates importantes" -#: .\core\errors.py:12 +#: core/errors.py:12 msgid "A folder with this name already exist" msgstr "Un dossier avec ce nom existe déjà" -#: .\core\errors.py:13 +#: core/errors.py:13 msgid "A folder can't be move inside one of its children" msgstr "Un dossier ne peut être déplacé dans un des dossiers qu'il contient" -#: .\core\errors.py:14 +#: core/errors.py:14 msgid "Specified ftl_folder doesn't exist" msgstr "Le ftl_folder spécifié n'existe pas" @@ -46,90 +46,94 @@ msgstr "Le ftl_folder spécifié n'existe pas" msgid "Document has been corrupted during upload, please retry" msgstr "Le document a été corrumpu durant son envoi, veuillez réessayer" +#: core/errors.py:18 +msgid "Unsupported document format" +msgstr "Format de document non supporté" + #: core/management/commands/import_docs.py:29 #, python-format msgid "Starting mass import for %(email)s from %(path)s" msgstr "Début de l'import de masse pour %(email)s depuis %(path)s" -#: .\core\management\commands\import_docs.py:43 +#: core/management/commands/import_docs.py:43 #, python-format msgid "One document successfully imported in %(time)s" msgid_plural "%(count)s documents successfully imported in %(time)s" msgstr[0] "Un document importé avec succès en %(time)s" msgstr[1] "%(count)s documents importés avec succès en %(time)s" -#: .\core\management\commands\import_docs.py:65 +#: core/management/commands/import_docs.py:65 #, python-format msgid "Created folder %(name)s" msgstr "Dossier %(name)s créé" -#: .\core\management\commands\import_docs.py:77 +#: core/management/commands/import_docs.py:77 #, python-format msgid "Imported document %(name)s" msgstr "Document %(name)s importé" -#: .\core\management\commands\reindex_docs.py:35 +#: core/management/commands/reindex_docs.py:51 #, python-format msgid "Forcing plugin %(value)s" msgstr "Plugin %(value)s forcé" -#: .\core\management\commands\reindex_docs.py:49 +#: core/management/commands/reindex_docs.py:80 #, python-format msgid "Starting to reindex one document" msgid_plural "Starting to reindex %(count)s documents" msgstr[0] "Réindexation d'un document lancée" msgstr[1] "Réindexation de %(count)s documents lancée" -#: .\core\management\commands\reindex_docs.py:58 +#: core/management/commands/reindex_docs.py:89 #, python-format msgid "Reindexing %(title)s" msgstr "Réindexation de %(title)s" -#: .\core\management\commands\reindex_docs.py:62 +#: core/management/commands/reindex_docs.py:93 msgid "OK" msgstr "OK" -#: .\core\management\commands\reindex_docs.py:72 +#: core/management/commands/reindex_docs.py:100 #, python-format msgid "One document successfully reindexed in %(time)s seconds" msgid_plural "%(count)s documents successfully reindexed in %(time)s seconds" msgstr[0] "Réindexation d'un document réussie en %(time)s secondes" msgstr[1] "Réindexation de %(count)s documents réussie en %(time)s secondes" -#: .\core\models.py:54 +#: core/models.py:55 msgid "This email can't be used." msgstr "Cet email ne peut pas être utilisé." -#: .\core\models.py:64 +#: core/models.py:65 msgid "This organization can't be used." msgstr "Cette organisation n'est pas disponible." -#: .\core\models.py:111 +#: core/models.py:112 msgid "username" msgstr "nom d'utilisateur" -#: .\core\models.py:117 .\core\models.py:129 +#: core/models.py:118 core/models.py:130 msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only." msgstr "" "Requis. 150 caractères ou moins. Lettres, chiffres et @/./+/-/_ seulement." -#: .\core\models.py:120 +#: core/models.py:121 msgid "A user with that username already exists." msgstr "Un utilisateur avec ce nom existe déjà." -#: .\core\models.py:124 +#: core/models.py:125 msgid "email address" msgstr "addresse email" -#: .\core\models.py:132 +#: core/models.py:133 msgid "A user with that email already exists." msgstr "Un utilisateur avec cet email existe déjà." -#: .\core\templates\core\home.html:5 +#: core/templates/core/home.html:5 msgid "Home" msgstr "Accueil" -#: .\core\templates\core\home.html:16 +#: core/templates/core/home.html:16 msgid "" "We're sorry but Paper Matter will not work without JavaScript enabled. " "Please enable it\n" diff --git a/ftl/frontend/src/styles/common_logged_out.scss b/ftl/frontend/src/styles/common_logged_out.scss index 6f41963cf7834869c3d9b0b46caacf6940fe572a..3e08b436520edb66808f5cea97d0ad62c72e9943 100644 --- a/ftl/frontend/src/styles/common_logged_out.scss +++ b/ftl/frontend/src/styles/common_logged_out.scss @@ -116,6 +116,10 @@ aside { } } + .cursor-help { + cursor: help; + } + ul { list-style: none; padding-left: 0; diff --git a/ftl/ftests/pages/base_page.py b/ftl/ftests/pages/base_page.py index 97a017fd42ab99510d64bcc87c68233be466a615..c762e9b5f8185ca0208886e77819e080d3e02006 100644 --- a/ftl/ftests/pages/base_page.py +++ b/ftl/ftests/pages/base_page.py @@ -116,7 +116,7 @@ class BasePage(LIVE_SERVER): options.binary_location = settings.BROWSER_BINARY_PATH self.browser = webdriver.Firefox( - executable_path=settings.DEFAULT_GECKODRIVER_PATH, + executable_path=settings.GECKODRIVER_PATH, firefox_profile=profile, firefox_options=options, ) @@ -145,8 +145,7 @@ class BasePage(LIVE_SERVER): options.add_experimental_option("prefs", chrome_profile) self.browser = webdriver.Chrome( - executable_path=settings.DEFAULT_CHROMEDRIVER_PATH, - chrome_options=options, + executable_path=settings.CHROMEDRIVER_PATH, chrome_options=options, ) else: raise ValueError("Unsupported browser, allowed: firefox, chrome") diff --git a/ftl/ftests/pages/user_login_page.py b/ftl/ftests/pages/user_login_page.py index 5a09f71f607bed6a1e9b5da673e367e9e373eedd..88431a38d6974319e0255a21d3e6b8029d394a6f 100644 --- a/ftl/ftests/pages/user_login_page.py +++ b/ftl/ftests/pages/user_login_page.py @@ -13,6 +13,7 @@ class LoginPage(BasePage): login_email_input = "#login-form #id_email" login_password_input = "#login-form #id_password" + login_remember_me_input = "#login-form #id_remember_me" login_submit_input = '#login-form [type="submit"]' login_failed_div = "#login-form .errorlist" @@ -20,18 +21,23 @@ class LoginPage(BasePage): password_reset_link = "#password-reset" - def log_user(self, user_num=1, email=None, password=None, skip_tour=True): + def log_user( + self, user_num=1, email=None, password=None, skip_tour=True, remember_me=True + ): if skip_tour: self.browser.execute_script('localStorage.setItem("tour_done", "true");') email_input = self.get_elem(self.login_email_input) password_input = self.get_elem(self.login_password_input) + remember_me_input = self.get_elem(self.login_remember_me_input) submit_input = self.get_elem(self.login_submit_input) if not email: email = getattr(tv, f"USER{user_num}_EMAIL") if not password: password = getattr(tv, f"USER{user_num}_PASS") + if remember_me: + remember_me_input.click() email_input.send_keys(email) password_input.send_keys(password) diff --git a/ftl/ftests/test_login.py b/ftl/ftests/test_login.py index f029c8c99dba0971dcfad786fd6eb8e54bc03645..16b4f3c74f8b7daa053108171a09d6112b40e70a 100644 --- a/ftl/ftests/test_login.py +++ b/ftl/ftests/test_login.py @@ -87,6 +87,35 @@ class LoginPageTests(LoginPage, HomePage, AdminLoginPage): self.log_user() self.assertIn("account locked", self.head_title) + def test_login_remember_me(self): + self.visit(LoginPage.url) + + self.log_user(remember_me=True) + + cookies = self.browser.get_cookies() + session_id_found = False + for cookie in cookies: + if cookie["name"] == "sessionid": + session_id_found = True + self.assertIn("expiry", cookie) + self.assertGreater(int(cookie["expiry"]), 0) + + self.assertTrue(session_id_found) + + def test_login_not_remember_me(self): + self.visit(LoginPage.url) + + self.log_user(remember_me=False) + + cookies = self.browser.get_cookies() + session_id_found = False + for cookie in cookies: + if cookie["name"] == "sessionid": + session_id_found = True + self.assertNotIn("expiry", cookie) + + self.assertTrue(session_id_found) + class ForgotPasswordTests(LoginPage, ResetPasswordPages): def setUp(self, **kwargs): diff --git a/ftl/ftl/_settings_local.sample.py b/ftl/ftl/_settings_local.sample.py index 0e64a03192d86001a4da06ea73866fb848bee64a..ffb487375aaaef97ad441027da134d35734c8177 100644 --- a/ftl/ftl/_settings_local.sample.py +++ b/ftl/ftl/_settings_local.sample.py @@ -50,8 +50,8 @@ TEST_BROWSER_HEADLESS = True # Update lines below if you don't want to use the default paths for browser and driver BROWSER_BINARY_PATH = None -DEFAULT_CHROMEDRIVER_PATH = "chromedriver" -DEFAULT_GECKODRIVER_PATH = "geckodriver" +CHROMEDRIVER_PATH = "chromedriver" +GECKODRIVER_PATH = "geckodriver" # TODO default should be fine unless your dev is related to remote storage and/or OCR """ diff --git a/ftl/ftl/forms.py b/ftl/ftl/forms.py index 1f9b28ba5effadbdc9b9499e3fb1e556a24132f7..3f55a788b4782ea99b96d0b391962a457cd5aecc 100644 --- a/ftl/ftl/forms.py +++ b/ftl/ftl/forms.py @@ -3,7 +3,7 @@ from django import forms from django.contrib.auth.forms import AuthenticationForm -from django.forms import EmailField +from django.forms import EmailField, BooleanField from django.utils.text import slugify from django.utils.translation import gettext_lazy as _ from django_registration.forms import RegistrationForm @@ -88,6 +88,7 @@ class FTLCreateOrgAndFTLUser(RegistrationForm): class FTLAuthenticationForm(AuthenticationForm): username = EmailField(widget=forms.TextInput(attrs={"autofocus": True})) + remember_me = BooleanField(required=False) def clean_username(self): email_ = self.cleaned_data["username"] diff --git a/ftl/ftl/locale/fr/LC_MESSAGES/django.po b/ftl/ftl/locale/fr/LC_MESSAGES/django.po index a5af8f4b5d7b90b89e237a8a882ee7e3b377fc12..4d9c37a8f8cf7860a532719063d29f00968d1bc7 100644 --- a/ftl/ftl/locale/fr/LC_MESSAGES/django.po +++ b/ftl/ftl/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-22 12:20+0200\n" +"POT-Creation-Date: 2020-07-30 16:36+0000\n" "PO-Revision-Date: 2020-06-22 12:21+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -18,15 +18,11 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.3.1\n" -#: ftl/forms.py:36 ftl/forms.py:82 -msgid "This email can't be used." -msgstr "Cet email ne peut pas être utilisé." - -#: ftl/forms.py:46 +#: ftl/forms.py:35 msgid "Organization name" msgstr "Nom de l'organisation" -#: .\ftl\forms.py:29 +#: ftl/forms.py:39 msgid "" "It's the name of your Paper Matter personal workspace, try to choose " "something unique (eg. based on your first and last name or company name)." @@ -35,23 +31,23 @@ msgstr "" "choisir quelque chose d'unique (ex : basé sur votre nom et prénom ou nom " "d'entreprise)." -#: .\ftl\forms.py:46 +#: ftl/forms.py:61 msgid "Organization already exists" msgstr "L'organisation existe déjà" -#: .\ftl\signals\handlers.py:11 +#: ftl/signals/handlers.py:13 msgid "Your session has expired or have been invalidated. Please log back in." msgstr "Votre session a expiré ou a été invalidée. Veuillez vous reconnecter." -#: .\ftl\signals\handlers.py:13 +#: ftl/signals/handlers.py:16 msgid "You have been logged out. See you!" msgstr "Vous êtes déconnecté. À bientôt !" -#: .\ftl\templates\ftl\axes\locked.html:6 +#: ftl/templates/ftl/axes/locked.html:6 msgid "Account locked" msgstr "Compte bloqué" -#: .\ftl\templates\ftl\axes\locked.html:11 +#: ftl/templates/ftl/axes/locked.html:11 msgid "" "\n" " Your account has been locked for security purpose. Please try " @@ -62,35 +58,35 @@ msgstr "" "Votre compte a été verrouillé à des fins de sécurité. Merci de réessayer à " "nouveau plus tard." -#: .\ftl\templates\ftl\base_email_body.txt:1 +#: ftl/templates/ftl/base_email_body.txt:1 msgid "Hello," msgstr "Bonjour," -#: .\ftl\templates\ftl\base_email_body.txt:5 +#: ftl/templates/ftl/base_email_body.txt:5 msgid "The Paper Matter team" msgstr "L'équipe Paper Matter" -#: .\ftl\templates\ftl\django_registration\activation_complete.html:5 +#: ftl/templates/ftl/django_registration/activation_complete.html:5 msgid "Account activated" msgstr "Compte activé" -#: .\ftl\templates\ftl\django_registration\activation_complete.html:8 +#: ftl/templates/ftl/django_registration/activation_complete.html:8 msgid "Account activated!" msgstr "Compte activé !" -#: .\ftl\templates\ftl\django_registration\activation_complete.html:9 +#: ftl/templates/ftl/django_registration/activation_complete.html:9 msgid "Your account has been activated, thank you! You may log in." msgstr "Votre compte a été activé, vous pouvez maintenant vous y connecter." -#: .\ftl\templates\ftl\django_registration\activation_complete.html:10 +#: ftl/templates/ftl/django_registration/activation_complete.html:10 msgid "Login to your account here:" msgstr "Connectez-vous à votre compte :" -#: .\ftl\templates\ftl\django_registration\activation_complete.html:10 +#: ftl/templates/ftl/django_registration/activation_complete.html:10 msgid "login page" msgstr "page de connexion" -#: .\ftl\templates\ftl\django_registration\activation_email_body.txt:4 +#: ftl/templates/ftl/django_registration/activation_email_body.txt:4 msgid "" "An account on Paper Matter has been created with this email. Follow the link " "below to\n" @@ -100,16 +96,16 @@ msgstr "" "dessous pour\n" "activer votre compte :" -#: .\ftl\templates\ftl\django_registration\activation_email_body.txt:9 +#: ftl/templates/ftl/django_registration/activation_email_body.txt:9 #, python-format msgid "The link will expire in %(expiration_days)s days." msgstr "Le lien expirera dans %(expiration_days)s jours." -#: .\ftl\templates\ftl\django_registration\activation_email_subject.txt:4 +#: ftl/templates/ftl/django_registration/activation_email_subject.txt:4 msgid "Activate your account" msgstr "Activer votre compte" -#: .\ftl\templates\ftl\django_registration\activation_failed.html:5 +#: ftl/templates/ftl/django_registration/activation_failed.html:5 msgid "Account could not be activated" msgstr "Le compte n'a pu être activé" @@ -117,15 +113,15 @@ msgstr "Le compte n'a pu être activé" msgid "We could not activate the account..." msgstr "Nous n'avons pu activer le compte..." -#: ftl/templates/ftl/django_registration/activation_failed.html:14 +#: ftl/templates/ftl/django_registration/activation_failed.html:15 msgid "The account you attempted to activate is invalid." msgstr "Le compte que vous essayez d'activer n'est pas valide." -#: ftl/templates/ftl/django_registration/activation_failed.html:15 +#: ftl/templates/ftl/django_registration/activation_failed.html:16 msgid "This account has expired." msgstr "Ce compte a expiré." -#: ftl/templates/ftl/django_registration/activation_failed.html:16 +#: ftl/templates/ftl/django_registration/activation_failed.html:17 msgid "The activation key you provided is invalid." msgstr "La clé d'activation fournie n'est pas valide." @@ -137,67 +133,83 @@ msgstr "Le compte que vous essayez d'activer a déjà été activé." msgid "Authorize" msgstr "Autoriser" -#: .\ftl\templates\ftl\oauth2_provider\authorize.html:18 +#: ftl/templates/ftl/oauth2_provider/authorize.html:18 msgid "Application requires following permissions" msgstr "L'application requiert les permissions suivantes" -#: .\ftl\templates\ftl\registration\create_org_and_ftluser.html:5 -#: .\ftl\templates\ftl\registration\signup.html:5 -#: .\ftl\templates\ftl\registration\signup.html:12 +#: ftl/templates/ftl/registration/create_org_and_ftluser.html:6 +#: ftl/templates/ftl/registration/signup.html:6 +#: ftl/templates/ftl/registration/signup.html:14 msgid "Signup" msgstr "Inscription" -#: .\ftl\templates\ftl\registration\create_org_and_ftluser.html:9 +#: ftl/templates/ftl/registration/create_org_and_ftluser.html:11 msgid "Create your account" msgstr "Créez votre compte" -#: .\ftl\templates\ftl\registration\create_org_and_ftluser.html:12 +#: ftl/templates/ftl/registration/create_org_and_ftluser.html:14 msgid "Create account" msgstr "Créer le compte" -#: .\ftl\templates\ftl\registration\login.html:5 -#: .\ftl\templates\ftl\registration\login.html:9 -#: .\ftl\templates\ftl\registration\login.html:34 +#: ftl/templates/ftl/registration/login.html:6 +#: ftl/templates/ftl/registration/login.html:19 +#: ftl/templates/ftl/registration/login.html:61 msgid "Login" msgstr "Se connecter" -#: .\ftl\templates\ftl\registration\login.html:15 -#: .\ftl\templates\ftl\registration\login.html:16 +#: ftl/templates/ftl/registration/login.html:25 +#: ftl/templates/ftl/registration/login.html:26 msgid "Email" msgstr "Email" -#: .\ftl\templates\ftl\registration\login.html:24 -#: .\ftl\templates\ftl\registration\login.html:25 +#: ftl/templates/ftl/registration/login.html:34 +#: ftl/templates/ftl/registration/login.html:35 msgid "Password" msgstr "Mot de passe" -#: .\ftl\templates\ftl\registration\login.html:27 +#: ftl/templates/ftl/registration/login.html:37 msgid "Forgot password?" msgstr "Mot de passe oublié ?" -#: .\ftl\templates\ftl\registration\password_change_done.html:4 -#: .\ftl\templates\ftl\registration\password_change_form.html:4 +#: ftl/templates/ftl/registration/login.html:48 +msgid "Remember me?" +msgstr "Se souvenir de moi ?" + +#: ftl/templates/ftl/registration/login.html:50 +msgid "" +"Leaving box unchecked, you will be automatically logged out on browser " +"close." +msgstr "" +"En laissant la case décochée, vous serez automatiquement déconnecté à la " +"fermeture du navigateur." + +#: ftl/templates/ftl/registration/login.html:52 +msgid "(Not recommended on a shared computer)" +msgstr "(Non recommandé sur un ordinateur partagé)" + +#: ftl/templates/ftl/registration/password_change_done.html:5 +#: ftl/templates/ftl/registration/password_change_form.html:5 msgid "Change password" msgstr "Modifier mon mot de passe" -#: .\ftl\templates\ftl\registration\password_change_done.html:8 +#: ftl/templates/ftl/registration/password_change_done.html:10 msgid "Password changed!" msgstr "Le mot de passe a été modifié !" -#: .\ftl\templates\ftl\registration\password_change_form.html:7 -#: .\ftl\templates\ftl\registration\password_change_form.html:47 +#: ftl/templates/ftl/registration/password_change_form.html:9 +#: ftl/templates/ftl/registration/password_change_form.html:49 msgid "Change my password" msgstr "Modifier mon mot de passe" -#: .\ftl\templates\ftl\registration\password_change_form.html:13 +#: ftl/templates/ftl/registration/password_change_form.html:15 msgid "Please correct the error below." msgstr "Merci de corriger l'erreur indiquée ci-dessous." -#: .\ftl\templates\ftl\registration\password_change_form.html:14 +#: ftl/templates/ftl/registration/password_change_form.html:16 msgid "Please correct the errors below." msgstr "Merci de corriger les erreurs indiquées ci-dessous." -#: .\ftl\templates\ftl\registration\password_change_form.html:19 +#: ftl/templates/ftl/registration/password_change_form.html:21 msgid "" "Please enter your old password, for security's sake, and then enter your new " "password twice so we can verify you typed it in correctly." @@ -205,16 +217,16 @@ msgstr "" "Pour des raisons de sécurité merci de saisir votre ancien mot de passe, " "saisissez ensuite le nouveau deux fois." -#: .\ftl\templates\ftl\registration\password_reset_confirm.html:5 +#: ftl/templates/ftl/registration/password_reset_confirm.html:6 msgid "New password" msgstr "Nouveau mot de passe :" -#: .\ftl\templates\ftl\registration\password_reset_confirm.html:10 -#: .\ftl\templates\ftl\registration\password_reset_subject.txt:4 +#: ftl/templates/ftl/registration/password_reset_confirm.html:12 +#: ftl/templates/ftl/registration/password_reset_subject.txt:4 msgid "Set new password" msgstr "Définition du nouveau mot de passe" -#: .\ftl\templates\ftl\registration\password_reset_confirm.html:11 +#: ftl/templates/ftl/registration/password_reset_confirm.html:13 msgid "" "Please enter your new password twice so we can verify you typed it in " "correctly." @@ -222,12 +234,12 @@ msgstr "" "Veuillez saisir votre nouveau mot de passe deux pour vérifier qu'il n'y a " "pas d'erreur." -#: .\ftl\templates\ftl\registration\password_reset_confirm.html:14 -#: .\ftl\templates\ftl\registration\password_reset_form.html:13 +#: ftl/templates/ftl/registration/password_reset_confirm.html:16 +#: ftl/templates/ftl/registration/password_reset_form.html:15 msgid "Reset my password" msgstr "Réinitialiser mon mot de passe" -#: .\ftl\templates\ftl\registration\password_reset_confirm.html:17 +#: ftl/templates/ftl/registration/password_reset_confirm.html:19 msgid "" "The password reset link was invalid, possibly because it has already been " "used. Please request a new password reset." @@ -236,11 +248,11 @@ msgstr "" "que celui-ci est déjà été utilisé.Veuillez renouveler la demande de " "réinitialisation." -#: .\ftl\templates\ftl\registration\password_reset_confirm.html:18 +#: ftl/templates/ftl/registration/password_reset_confirm.html:20 msgid "Back" msgstr "Retour" -#: .\ftl\templates\ftl\registration\password_reset_email.html:4 +#: ftl/templates/ftl/registration/password_reset_email.html:4 #, python-format msgid "" "You're receiving this email because you requested a password reset for your " @@ -256,12 +268,12 @@ msgid "If you don't requested this change, you can ignore this email." msgstr "" "Si vous n'êtes pas à l'origine de la demande, vous pouvez ignorer cet email." -#: ftl/templates/ftl/registration/password_reset_form.html:5 -#: ftl/templates/ftl/registration/password_reset_form.html:9 +#: ftl/templates/ftl/registration/password_reset_form.html:6 +#: ftl/templates/ftl/registration/password_reset_form.html:11 msgid "Reset password" msgstr "Réinitialiser mon mot de passe" -#: .\ftl\templates\ftl\registration\password_reset_form.html:10 +#: ftl/templates/ftl/registration/password_reset_form.html:12 msgid "" "Forgotten your password? Enter your email address below, and we'll email " "instructions for setting a new one." @@ -269,7 +281,7 @@ msgstr "" "Mot de passe oublié ? Saisissez votre email ci-dessous et nous vous " "enverrons les instructions pour en définir un nouveau." -#: .\ftl\templates\ftl\registration\signup.html:9 +#: ftl/templates/ftl/registration/signup.html:11 #, python-format msgid "" "Create your account in %(org_name)s " @@ -278,31 +290,31 @@ msgstr "" "Créez votre compte dans l'organisation " "%(org_name)s" -#: .\ftl\templates\ftl\registration\signup_success.html:5 +#: ftl/templates/ftl/registration/signup_success.html:6 msgid "Signup succeed" msgstr "Inscription réussie" -#: .\ftl\templates\ftl\registration\signup_success.html:8 +#: ftl/templates/ftl/registration/signup_success.html:10 msgid "One more thing..." msgstr "Une dernière chose..." -#: .\ftl\templates\ftl\registration\signup_success.html:9 +#: ftl/templates/ftl/registration/signup_success.html:11 msgid "" -"Please verify your email inbox to activate your " -"account." +"Please verify your email inbox to activate " +"your account." msgstr "" -"Merci de vérifier votre boite email pour activer " -"votre compte." +"Merci de vérifier votre boite email pour " +"activer votre compte." -#: .\ftl\templates\ftl\registration\signup_success.html:10 +#: ftl/templates/ftl/registration/signup_success.html:12 msgid "Once your account has been activated, you can pursue to:" msgstr "Une fois votre compte activé, vous pourrez vous rendre sur :" -#: .\ftl\templates\ftl\registration\signup_success.html:10 +#: ftl/templates/ftl/registration/signup_success.html:12 msgid "Login page" msgstr "Page de connexion" -#: .\ftl\views.py:58 +#: ftl/views.py:61 msgid "" "We’ve emailed you instructions for setting your password, if an account " "exists with the email you entered. You should receive them shortly (check " @@ -312,14 +324,19 @@ msgstr "" "réinitialiser votre mot de passe vous ont été envoyées. Vous devriez les " "recevoir rapidement (vérifiez votre dossier spam si ce n'est pas le cas)." -#: .\ftl\views.py:64 +#: ftl/views.py:68 msgid "Your password has been set. You may go ahead and log in now." msgstr "" "Votre mot de passe a bien été enregistré, vous pouvez vous connecter avec " "celui-ci." -#: .\ftl\views.py:75 +#: ftl/views.py:80 msgid "" "Your email has been verified, thank you! You may go ahead and log in now." msgstr "" "Votre email a bien éte vérifié, merci ! Vous pouvez vous connecter désormais." + +#~ msgid "" +#~ "If you use \"Remember me\" and forgot to logout on a shared computer, " +#~ "someone could access your account." +#~ msgstr "Si vous utilisez \"Se souvenir, someone could access your account." diff --git a/ftl/ftl/otp_plugins/otp_ftl/locale/fr/LC_MESSAGES/django.po b/ftl/ftl/otp_plugins/otp_ftl/locale/fr/LC_MESSAGES/django.po index c2e451495a89075b4702c838f40b8899aa8ec144..d6f32fe3ccf806329a51e42d23ad2da91e4f3c0d 100644 --- a/ftl/ftl/otp_plugins/otp_ftl/locale/fr/LC_MESSAGES/django.po +++ b/ftl/ftl/otp_plugins/otp_ftl/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 16:59+0000\n" +"POT-Creation-Date: 2020-07-30 16:36+0000\n" "PO-Revision-Date: 2020-02-14 15:51+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -18,49 +18,48 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.3\n" -#: .\ftl\otp_plugins\otp_ftl\forms.py:18 +#: ftl/otp_plugins/otp_ftl/forms.py:18 msgid "Set of emergency codes" msgstr "Lot de codes d'urgence" -#: .\ftl\otp_plugins\otp_ftl\forms.py:19 +#: ftl/otp_plugins/otp_ftl/forms.py:19 msgid "Select set of codes to use" msgstr "Sélectionner le lot de code à utiliser" -#: .\ftl\otp_plugins\otp_ftl\forms.py:23 .\ftl\otp_plugins\otp_ftl\forms.py:60 -#: .\ftl\otp_plugins\otp_ftl\forms.py:84 +#: ftl/otp_plugins/otp_ftl/forms.py:24 ftl/otp_plugins/otp_ftl/forms.py:67 +#: ftl/otp_plugins/otp_ftl/forms.py:94 msgid "Code" msgstr "Code" -#: .\ftl\otp_plugins\otp_ftl\forms.py:25 +#: ftl/otp_plugins/otp_ftl/forms.py:27 msgid "" "One emergency code from your set (alphanumeric code, it will be consumed)" msgstr "" "Un code à usage unique du lot (code alphanumérique, un code sera utilisé " "définitivement)" -#: .\ftl\otp_plugins\otp_ftl\forms.py:55 .\ftl\otp_plugins\otp_ftl\forms.py:146 +#: ftl/otp_plugins/otp_ftl/forms.py:61 ftl/otp_plugins/otp_ftl/forms.py:162 msgid "Authenticator app" msgstr "Apps d'authentification" -#: .\ftl\otp_plugins\otp_ftl\forms.py:56 +#: ftl/otp_plugins/otp_ftl/forms.py:62 msgid "Select the authenticator app you wish to use" msgstr "Sélectionner l'app d'authentification souhaitée" -#: .\ftl\otp_plugins\otp_ftl\forms.py:62 .\ftl\otp_plugins\otp_ftl\forms.py:86 +#: ftl/otp_plugins/otp_ftl/forms.py:69 ftl/otp_plugins/otp_ftl/forms.py:96 msgid "Two factor code shown in your app authenticator (only numbers)" msgstr "Code indiqué dans votre app d'authentification (chiffres uniquement)" -#: .\ftl\otp_plugins\otp_ftl\forms.py:126 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:10 +#: ftl/otp_plugins/otp_ftl/forms.py:142 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:10 msgid "Emergency codes" msgstr "Codes d'urgence" -#: .\ftl\otp_plugins\otp_ftl\forms.py:127 -#: .\ftl\otp_plugins\otp_ftl\forms.py:147 +#: ftl/otp_plugins/otp_ftl/forms.py:143 ftl/otp_plugins/otp_ftl/forms.py:163 msgid "Indicate a name to recognize your two factor device" msgstr "Nommer votre appareil d'authentification pour le reconnaitre plus tard" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_confirm_delete.html:9 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_confirm_delete.html:9 #, python-format msgid "" "\n" @@ -80,44 +79,45 @@ msgid "" msgstr "" "\n" "Vous allez supprimer le dernier appareil d'authentification, cela aura pour " -"conséquence de désactiver l'authentification à 2 facteurs sur votre compte (déconseillé).\n" +"conséquence de désactiver l'authentification à 2 facteurs sur votre compte " +"(déconseillé).\n" " " #: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_confirm_delete.html:24 #: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_update.html:15 -#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:36 -#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:57 -#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:46 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:40 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:59 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:49 #: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:26 -#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:46 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:49 #: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_detail.html:35 #: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:32 msgid "Cancel" msgstr "Annuler" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_confirm_delete.html:15 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:28 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:76 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:107 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_confirm_delete.html:25 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:29 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:79 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:112 msgid "Delete" msgstr "Supprimer" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:7 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:7 msgid "Two factor authentication" msgstr "Authentification à deux facteurs" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:18 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:62 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:99 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_update.html:16 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:19 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:64 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:103 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_update.html:16 msgid "Rename" msgstr "Renommer" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:24 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:25 msgid "Invalid" msgstr "Invalide" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:36 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:37 msgid "" "\n" " All codes in this set have been " @@ -130,40 +130,40 @@ msgstr "" "pas risquer de perdre l'accès à votre compte.\n" " " -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:48 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_detail.html:14 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:5 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:49 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_detail.html:14 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:5 msgid "Generate emergency two factor codes" msgstr "Générer un lot de codes d'urgence" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:53 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:54 msgid "Authenticator apps" msgstr "Apps d'authentification" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:71 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:73 msgid "Not confirmed" msgstr "Non validé" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:84 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:5 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:87 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:5 msgid "Add an authenticator app" msgstr "Ajouter une app d'authentification" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:89 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:92 msgid "Security keys (U2F/FIDO2)" msgstr "Clés de sécurité (U2F/FIDO2)" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:114 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:10 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:119 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:10 msgid "Add a security key" msgstr "Ajouter une clé de sécurité" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:118 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:123 msgid "Protect your Paper Matter account with two factor verification" msgstr "" "Protéger votre compte Paper Matter avec une authentification à deux facteurs" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:120 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:125 msgid "" "\n" " A validation code or security key will be asked each time " @@ -181,80 +181,80 @@ msgstr "" "Il n'y a aucun appareil d'authentification à deux facteurs configuré sur " "votre compte." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:138 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:145 msgid "Add an authentication app (recommended)" msgstr "Ajouter une application d'authentification (recommandé)" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_list.html:139 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_list.html:150 msgid "Add a security key (U2F/FIDO2)" msgstr "Ajouter une clé de sécurité (U2F/FIDO2)" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_update.html:5 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_update.html:5 msgid "Rename device" msgstr "Renommer l'appareil" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_update.html:9 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_update.html:10 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:24 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_update.html:9 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_update.html:10 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:24 msgid "Device name" msgstr "Nom de l'appareil" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\device_update.html:12 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/device_update.html:12 msgid "Name to recognize your two factor device" msgstr "Nom de votre choix pour reconnaître votre appareil d'authentification" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:5 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:12 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:6 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:10 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:6 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:10 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:6 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:16 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:7 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:13 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:7 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:13 msgid "Two-step Verification" msgstr "Vérification à deux facteurs" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:15 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:13 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:13 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:19 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:16 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:16 msgid "This extra step shows that it’s really you trying to sign in" msgstr "" "Cette étape supplémentaire nous permet de vérifier que ce soit réellement " "vous qui vous connectez" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:24 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:28 msgid "Missing or invalid security key." msgstr "Clé de sécurité manquante ou invalide." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:29 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:33 msgid "Insert your security key" msgstr "Insérer votre clé de sécurité" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:32 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:36 msgid "Error: you can't use a security key on this account." msgstr "" "Une erreur est survenue : vous ne pouvez pas utiliser de clé de sécurité sur " "ce compte." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:36 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:46 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:46 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:44 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:53 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:53 msgid "Try another way" msgstr "Essayer une autre méthode" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:39 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:52 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:47 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:59 msgid "Use a code from your authentication app" msgstr "Utiliser un code affiché sur votre app d'authentification" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_check.html:42 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:52 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_check.html:50 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:59 msgid "Use a one time emergency code" msgstr "Utiliser un code à usage unique" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_detail.html:5 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_detail.html:5 msgid "Your security key has been added!" msgstr "Votre clé de sécurité a été ajoutée !" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_detail.html:8 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_detail.html:8 msgid "" "\n" " We highly recommend you generate a set of emergency code too in " @@ -265,11 +265,11 @@ msgstr "" "Nous recommandons vivement de générer également des codes d'urgence, dans " "l'hypothèse oú vous perdriez votre clé de sécurité." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_detail.html:13 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_detail.html:13 msgid "No thanks" msgstr "Non merci" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:13 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:13 msgid "" "\n" " A security key dongle is a small device that you can buy to help " @@ -282,7 +282,7 @@ msgstr "" "permet de prouver votre identité lorsque vous vous connectez : vous n'avez " "qu'à connecter votre clé à votre ordinateur, téléphone ou tablette." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:19 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:19 msgid "" "\n" " Such keys are the ones that are compatible with the U2F or FIDO2 " @@ -299,27 +299,27 @@ msgstr "" "navigateurs récents sont compatibles comme Google Chrome, Mozilla Firefox, " "Microsoft Edge, Safari." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:29 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:29 msgid "Security key name" msgstr "Nom de la clé de sécurité" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:30 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:30 msgid "Security key with house key" msgstr "Clé de sécurité avec la clé de la maison" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:32 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:32 msgid "A name to identify your security key" msgstr "Un nom pour identifier votre clé de sécurité" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:37 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:37 msgid "Browser prompt asking for the key was cancel" msgstr "La demande du navigateur concernant la clé a été annulée" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:39 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:39 msgid "Browser prompt asking for the key was ignore or refused" msgstr "La demande du navigateur concernant la clé a été ignorée ou refusée" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:41 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:41 msgid "" "\n" " Key registration failed, make sure your key type is " @@ -335,82 +335,82 @@ msgstr "" "page n'est pas en https.
\n" " " -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:46 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:46 msgid "A network error occurred during key registration, try again" msgstr "" "Une erreur de connectivité est survenue durant l'enregistrement de la clé, " "essayez de nouveau" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:48 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:48 msgid "" "An internal error occured during key registration, you may have found a bug" msgstr "" "Une erreur interne est survenue durant l'enregistrement de la clé, il s'agit " "peut être d'un bug" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:50 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:50 msgid "This key is already registred" msgstr "Cette clé est déjà enregistrée" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:52 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:52 msgid "" "An unknown error occured during key registration, you may have found a bug" msgstr "" "Une erreur inconnue est survenue durant l'enregistrement de la clé, il " "s'agit peut être d'un bug" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:54 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:54 msgid "" "An unexpected error occured during key registration, you may have found a bug" msgstr "" "Une erreur inattendue est survenue durant l'enregistrement de la clé, il " "s'agit peut être d'un bug" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:56 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:56 msgid "error code: " msgstr "code erreur : " -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\fido2device_form.html:60 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:27 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:33 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/fido2device_form.html:60 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:27 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:33 msgid "Next" msgstr "Suivant" -#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:35 -#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:35 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:38 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:38 #: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_detail.html:32 msgid "Incorrect code" msgstr "Code incorrect" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:39 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:39 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:42 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:42 msgid "Verify" msgstr "Vérifier" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:42 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:45 msgid "Error: you can't use emergency code on this account." msgstr "" "Une erreur est survenue : vous ne pouvez pas utiliser de codes d'urgence sur " "ce compte." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_check.html:49 -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:49 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_check.html:56 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:56 msgid "Use your security key" msgstr "Insérer votre clé de sécurité" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_detail.html:5 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_detail.html:5 msgid "Your emergency two factor codes (one use only!)" msgstr "Vos codes d'urgence à usage unique" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_detail.html:12 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_detail.html:12 msgid "Return to list" msgstr "Revenir à la liste" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_detail.html:15 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_detail.html:15 msgid "Print codes" msgstr "Imprimer les codes" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:7 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:7 msgid "" "\n" " We highly recommend you generate a set of emergency code too in " @@ -422,7 +422,7 @@ msgstr "" "Nous recommandons vivement de générer des codes d'urgence en plus, dans le " "cas où vous perdriez votre téléphone ou votre clé de sécurité." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:13 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:13 msgid "" "\n" " For security reasons, each code will only work one (1) time.
Conservez " "ces codes en lieu sûr." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:21 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:21 msgid "Emergency codes name" msgstr "Nom des codes d'urgence" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:22 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:22 msgid "Safe deposit box emergency codes" msgstr "Lot de codes d'urgence du coffre fort" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\staticdevice_form.html:24 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/staticdevice_form.html:24 msgid "Could be its storage location or a clue to remember it" msgstr "Il peut s'agir du lieu de stockage ou d'un indice pour s'en souvenir" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_check.html:42 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_check.html:45 msgid "Error: you can't use an authenticator app on this account." msgstr "" "Une erreur est survenue : vous ne pouvez pas utiliser une app " "d'authentification sur ce compte." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_detail.html:5 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_detail.html:5 msgid "Confirm your authenticator app" msgstr "Valider votre app d'authentification" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_detail.html:8 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_detail.html:8 msgid "Scan this QR code with the authenticator app:" msgstr "Scannez ce code QR avec votre app d'authentification :" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_detail.html:14 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_detail.html:14 msgid "" "\n" " Confirm that you have successfully configured your " @@ -471,11 +471,11 @@ msgstr "" "Validez que vous avez bien configuré votre app d'authentification en " "indiquant le code affiché dans l'app ci-dessous." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_detail.html:31 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_detail.html:36 msgid "Validate" msgstr "Valider" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:7 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:7 msgid "" "\n" " Use an app on your phone to generate validation code. In the " @@ -487,7 +487,7 @@ msgstr "" "Utiliser une app d'authentification pour générer des codes de validation. " "Depuis l'app, scanner le code QR qui sera affiché sur la page suivante." -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:13 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:13 msgid "" "\n" " You could use the Google Authenticator app, available on\n" @@ -507,25 +507,13 @@ msgstr "" "id388497605?mt=8\" target=\"_blank\">App Store.\n" " " -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:26 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:26 msgid "My smartphone or tablet name" msgstr "Le nom de mon smartphone ou de ma tablette" -#: .\ftl\otp_plugins\otp_ftl\templates\otp_ftl\totpdevice_form.html:29 +#: ftl/otp_plugins/otp_ftl/templates/otp_ftl/totpdevice_form.html:29 msgid "" "Device name on which auth app is installed, to help you recognize it later." msgstr "" "Nom de l'appareil sur lequel l'appli sera installée, pour vous aider à " "l'identifier plus tard." - -#~ msgid "" -#~ "\n" -#~ " Please use the import app before enabling 2FA (the\n" -#~ " app doesn't support 2FA yet).\n" -#~ " " -#~ msgstr "" -#~ "\n" -#~ "Penser à utiliser le " -#~ "logiciel d'import avant d'activer l'authentification à deux facteurs " -#~ "(l'application ne le supporte pas encore)." diff --git a/ftl/ftl/otp_plugins/otp_ftl/views.py b/ftl/ftl/otp_plugins/otp_ftl/views.py index f59bb913e471ffb0f1b18665ab3d26fddc51c69e..8d44db0480e607ba589df766e1f4372bdae41eed 100644 --- a/ftl/ftl/otp_plugins/otp_ftl/views.py +++ b/ftl/ftl/otp_plugins/otp_ftl/views.py @@ -1,6 +1,6 @@ # Copyright (c) 2020 Exotic Matter SAS. All rights reserved. # Licensed under the BSL License. See LICENSE in the project root for license information. - +from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect from django.utils.decorators import method_decorator @@ -14,7 +14,7 @@ from django_otp.plugins.otp_static.models import StaticDevice, StaticToken from django_otp.plugins.otp_totp.models import TOTPDevice from ftl.otp_plugins.otp_ftl.models import Fido2Device -from ftl.views_auth import LoginViewFTL +from ftl.views_auth import LoginViewFTLBase @method_decorator(login_required, name="dispatch") @@ -47,14 +47,20 @@ class ListOTPDevices(ContextMixin, View): class OTPCheckView(View): def get(self, request, *args, **kwargs): # Reduce session expiration to 10 minutes during 2FA check (in case user afk). + request.session["ftl_expiry_age"] = ( + 0 + if request.session.get_expire_at_browser_close() + else request.session.get_expiry_age() + ) request.session.set_expiry(600) + request.session.modified = True devices = list( (d.persistent_id, d.name) for d in devices_for_user(request.user) ) - _next = request.GET.get("next", None) + _next = request.GET.get(REDIRECT_FIELD_NAME, None) if _next: - request.session["next"] = _next + request.session[REDIRECT_FIELD_NAME] = _next # Redirect to available device check page, from most secure to less secure one if [d for d in devices if Fido2Device.model_label() in d[0]]: @@ -67,7 +73,7 @@ class OTPCheckView(View): return redirect("otp_static_check", *args, **kwargs) -class FTLBaseCheckView(LoginViewFTL): +class FTLBaseCheckView(LoginViewFTLBase): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["have_fido2"] = Fido2Device.objects.filter( @@ -82,9 +88,9 @@ class FTLBaseCheckView(LoginViewFTL): return context def get_success_url(self): - url = self.request.session.get("next", None) + url = self.request.session.get(REDIRECT_FIELD_NAME, None) if url: - del self.request.session["next"] + del self.request.session[REDIRECT_FIELD_NAME] url_is_safe = is_safe_url( url=url, allowed_hosts=self.get_success_url_allowed_hosts(), @@ -101,7 +107,8 @@ class FTLBaseCheckView(LoginViewFTL): def form_valid(self, form): # Restore session expiration to default value - self.request.session.set_expiry(None) + self.request.session.set_expiry(self.request.session["ftl_expiry_age"]) + self.request.session.modified = True return super().form_valid(form) diff --git a/ftl/ftl/otp_plugins/otp_ftl/views_totp.py b/ftl/ftl/otp_plugins/otp_ftl/views_totp.py index ba5dbc259fb9c89c7fcdfdef3e8ac8f1d38d5e00..f0bde3a877aa6d897ceb40f7dc403a961fc261d8 100644 --- a/ftl/ftl/otp_plugins/otp_ftl/views_totp.py +++ b/ftl/ftl/otp_plugins/otp_ftl/views_totp.py @@ -20,7 +20,7 @@ from ftl.otp_plugins.otp_ftl.forms import ( TOTPDeviceConfirmForm, ) from ftl.otp_plugins.otp_ftl.views import FTLBaseCheckView, FTLBaseDeleteView -from ftl.views_auth import LoginViewFTL +from ftl.views_auth import LoginViewFTLBase @method_decorator(login_required, name="dispatch") @@ -44,7 +44,7 @@ class TOTPDeviceDisplay(DetailView): @method_decorator(login_required, name="dispatch") @method_decorator(otp_required(if_configured=True), name="dispatch") -class TOTPDeviceConfirm(SingleObjectMixin, LoginViewFTL): +class TOTPDeviceConfirm(SingleObjectMixin, LoginViewFTLBase): template_name = "otp_ftl/totpdevice_detail.html" form_class = TOTPDeviceConfirmForm model = TOTPDevice diff --git a/ftl/ftl/settings.py b/ftl/ftl/settings.py index c18adf1d81364ffc76a38c038862a59f75139818..8f79381a078adadb4aab8b11f3858e16440ed675 100644 --- a/ftl/ftl/settings.py +++ b/ftl/ftl/settings.py @@ -195,8 +195,8 @@ TEST_BROWSER_HEADLESS = True # Update lines below if you don't want to use the default paths for browser and driver BROWSER_BINARY_PATH = None -DEFAULT_CHROMEDRIVER_PATH = "chromedriver" -DEFAULT_GECKODRIVER_PATH = "geckodriver" +CHROMEDRIVER_PATH = "chromedriver" +GECKODRIVER_PATH = "geckodriver" # Email activation settings ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window diff --git a/ftl/ftl/templates/ftl/registration/login.html b/ftl/ftl/templates/ftl/registration/login.html index 46ed911678a67e823942bde451b2c20d5fc95c2e..e7d1c4a69e87afeb514a9df1ced4266a9df6b8ae 100644 --- a/ftl/ftl/templates/ftl/registration/login.html +++ b/ftl/ftl/templates/ftl/registration/login.html @@ -22,7 +22,7 @@
+ placeholder="{% trans 'Email' %}" tabindex="1" required autofocus>
{% if form.username.errors %} @@ -31,17 +31,34 @@
+ placeholder="{% trans 'Password' %}" tabindex="2" required> {% trans "Forgot password?" %} + id="password-reset" tabindex="5">{% trans "Forgot password?" %}
{% if form.password.errors %}
{{ form.password.errors }}
{% endif %} - +
+ + +
+ + {% if form.password.errors %} +
{{ form.password.errors }}
+ {% endif %} + + {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %} diff --git a/ftl/ftl/urls.py b/ftl/ftl/urls.py index b92c1f6e6d32571383258bbebd2c4a3443fbe6ef..aeea0d11eedeb7f14a873a7ff297db571cca1be0 100644 --- a/ftl/ftl/urls.py +++ b/ftl/ftl/urls.py @@ -28,6 +28,7 @@ from ftl import views from ftl.forms import FTLAuthenticationForm from ftl.ftl_setup_middleware import SetupState from ftl.views import PasswordResetAsked, PasswordResetDone +from ftl.views_auth import LoginViewFTL urlpatterns = [ path("admin/", admin.site.urls), @@ -45,7 +46,7 @@ urlpatterns = [ # path('signup//', views.CreateFTLUserFormView.as_view(), name='signup_user'), path( "login/", - auth_views.LoginView.as_view( + LoginViewFTL.as_view( authentication_form=FTLAuthenticationForm, redirect_authenticated_user=True ), kwargs={"ftl_setup_state": SetupState.admin_created}, diff --git a/ftl/ftl/views_auth.py b/ftl/ftl/views_auth.py index 84e85b22e7a81fa6505ff01a75c0b21f29f4afff..9d19d4c9751100c59934b97cc8446a27abdff12c 100644 --- a/ftl/ftl/views_auth.py +++ b/ftl/ftl/views_auth.py @@ -5,10 +5,10 @@ from django.contrib.auth.views import LoginView from django.http import HttpResponseRedirect -class LoginViewFTL(LoginView): +class LoginViewFTLBase(LoginView): """ Custom login view for setting authentication backend. Needed because we use multiple auth backend (Django axes for - rate limiting). + rate limiting). (Used by 2FA form) """ def form_valid(self, form): @@ -19,3 +19,17 @@ class LoginViewFTL(LoginView): backend="django.contrib.auth.backends.ModelBackend", ) return HttpResponseRedirect(self.get_success_url()) + + +class LoginViewFTL(LoginViewFTLBase): + """ + Custom login view for handling remember me (used for main login form) + """ + + def form_valid(self, form): + remember_me = form.cleaned_data["remember_me"] + if not remember_me: + self.request.session.set_expiry(0) + self.request.session.modified = True + + return super().form_valid(form) diff --git a/ftl/setup/locale/fr/LC_MESSAGES/django.po b/ftl/setup/locale/fr/LC_MESSAGES/django.po index 0d31466ee8ddf10ddf6c01f3a991ff6d548ec014..2b352a73fdab5f46c39c6c5f22d2f126733099f6 100644 --- a/ftl/setup/locale/fr/LC_MESSAGES/django.po +++ b/ftl/setup/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-01-27 11:35+0000\n" +"POT-Creation-Date: 2020-07-30 16:36+0000\n" "PO-Revision-Date: 2019-03-05 17:05+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -18,31 +18,31 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 2.0.6\n" -#: setup/forms.py:13 +#: setup/forms.py:14 msgid "Organization name" msgstr "Nom de l'organisation" -#: setup/forms.py:34 +#: setup/forms.py:40 msgid "Organization already exists" msgstr "L'organisation existe déjà" -#: setup/templates/setup/first_org_and_admin_creation_form.html:5 +#: setup/templates/setup/first_org_and_admin_creation_form.html:6 msgid "Create first organization and administrator" msgstr "Créez la première organisation et l'administrateur" -#: setup/templates/setup/first_org_and_admin_creation_form.html:9 +#: setup/templates/setup/first_org_and_admin_creation_form.html:11 msgid "Welcome to your Paper Matter instance!" msgstr "Bienvenue sur votre instance Paper Matter !" -#: setup/templates/setup/first_org_and_admin_creation_form.html:11 +#: setup/templates/setup/first_org_and_admin_creation_form.html:13 msgid "Some concepts to get started:" msgstr "Quelques notions pour bien débuter :" -#: setup/templates/setup/first_org_and_admin_creation_form.html:12 +#: setup/templates/setup/first_org_and_admin_creation_form.html:14 msgid "Administrator > Instance > Organization > User" msgstr "Administrateur > Instance > Organisation > Utilisateur" -#: setup/templates/setup/first_org_and_admin_creation_form.html:14 +#: setup/templates/setup/first_org_and_admin_creation_form.html:16 msgid "" "The administrator can administrate the whole instance via the Admin " "portal" @@ -50,7 +50,7 @@ msgstr "" "L'administrateur peut administrer l'instance entière à partir du " "portail admin" -#: setup/templates/setup/first_org_and_admin_creation_form.html:15 +#: setup/templates/setup/first_org_and_admin_creation_form.html:17 msgid "" "This instance can host multiple organizations, each " "organization can have multiple users." @@ -58,14 +58,14 @@ msgstr "" "Cette instance peut héberger plusieures organisations, chaque " "organisation peut avoir plusieurs utilisateurs." -#: setup/templates/setup/first_org_and_admin_creation_form.html:16 +#: setup/templates/setup/first_org_and_admin_creation_form.html:18 msgid "" "A user can only access data and documents of its organization." msgstr "" "Un utilisateur peut seulement accéder aux données et documents de son " "organisation." -#: setup/templates/setup/first_org_and_admin_creation_form.html:17 +#: setup/templates/setup/first_org_and_admin_creation_form.html:19 msgid "" "Finally, the administrator is an user of the first " "organization." @@ -73,24 +73,24 @@ msgstr "" "Enfin, l'administrateur est un utilisateur de la première " "organisation." -#: setup/templates/setup/first_org_and_admin_creation_form.html:21 +#: setup/templates/setup/first_org_and_admin_creation_form.html:23 msgid "Create the first organization of your instance and its administrator:" msgstr "" "Créez la première organisation de votre instance et son administrateur :" -#: setup/templates/setup/first_org_and_admin_creation_form.html:24 +#: setup/templates/setup/first_org_and_admin_creation_form.html:26 msgid "Finish" msgstr "Terminer" -#: setup/templates/setup/success.html:5 +#: setup/templates/setup/success.html:6 msgid "Setup completed" msgstr "Configuration terminée" -#: setup/templates/setup/success.html:8 +#: setup/templates/setup/success.html:10 msgid "Congratulations!" msgstr "Félicitations !" -#: setup/templates/setup/success.html:9 +#: setup/templates/setup/success.html:11 #, python-format msgid "" "%(org_name)s organization was created along " @@ -99,22 +99,22 @@ msgstr "" "L'organisation %(org_name)s ainsi que " "l'administrateur ont été créé." -#: setup/templates/setup/success.html:10 +#: setup/templates/setup/success.html:12 msgid "You can now:" msgstr "Vous pouvez maintenant :" -#: setup/templates/setup/success.html:17 +#: setup/templates/setup/success.html:19 msgid "Connect to admin pannel here:" msgstr "Vous connecter à l'interface d'administration ici :" -#: setup/templates/setup/success.html:19 +#: setup/templates/setup/success.html:21 msgid "admin login page" msgstr "page de connexion pour les administrateurs" -#: setup/templates/setup/success.html:22 +#: setup/templates/setup/success.html:24 msgid "Connect as a user to first organization here:" msgstr "Connectez-vous à la première organisation en tant qu'utilisateur :" -#: setup/templates/setup/success.html:24 +#: setup/templates/setup/success.html:26 msgid "user login page" msgstr "page de connexion"