From 6b23d8a2ca232b435dbdfa30d2de177c829ccfe0 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 22 Jun 2022 07:53:20 +0000 Subject: [PATCH] [FIX] auth_totp: show trusted devices in user prefs PR #75535 introduced trusted devices, but only made them visible in the main user form (for admins) and in the portal. It's quite useful for users to be able to view and manage their trusted devices in their own user preferences as well. This commit add them in the "Account Security" of the user profile. In addition: - improve the layout of the trusted devices by wrapping them in a to have them stand out from the surrounding prefs - move the "Account is protected" label about the trusted devices, and under main the 2FA toggle button, where it's supposed to be. - removed the custom form view for trusted devices inside the one2many. The point was to hide the extra `scope` field, but it's not worth it, and the Cancel button wasn't even working, the default form view is better. - improve the confirmation message of the "Revoke All" button when it's located on the user management form (for admins) to clarify that it's not the admin's devices that will be revoked. - change the 2FA label from "Your Account is protected" to "This account is protected" when located on the user management form for admins. Note: this is a manual partial fwd-port of #94111, as this part was mistakenly dropped in the fwd-port chain at #94193 closes odoo/odoo#94869 X-original-commit: d3a7910788ceff856fc6a843876579d379ce9caf Signed-off-by: Olivier Dony --- addons/auth_totp/i18n/auth_totp.pot | 36 +++++++++----- addons/auth_totp/views/res_users_views.xml | 58 +++++++++++----------- 2 files changed, 54 insertions(+), 40 deletions(-) diff --git a/addons/auth_totp/i18n/auth_totp.pot b/addons/auth_totp/i18n/auth_totp.pot index d67e0dea752..468e5c28b7a 100644 --- a/addons/auth_totp/i18n/auth_totp.pot +++ b/addons/auth_totp/i18n/auth_totp.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~14.5\n" +"Project-Id-Version: Odoo Server saas~15.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-14 10:28+0000\n" -"PO-Revision-Date: 2021-09-14 10:28+0000\n" +"POT-Creation-Date: 2022-06-21 13:22+0000\n" +"PO-Revision-Date: 2022-06-21 13:22+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -33,10 +33,16 @@ msgid "2-Factor authentication is now enabled." msgstr "" #. module: auth_totp -#: model_terms:ir.ui.view,arch_db:auth_totp.view_totp_field #: model_terms:ir.ui.view,arch_db:auth_totp.view_totp_form msgid "" "