2FA nag covers more features.

Ylian Saint-Hilaire committed Dec 15, 2020 at 11:25 UTC 0d236bcde250ab3aab3b064acb4e0a47cc776f3c
2 files changed +32 -21
translate/translate.json
+25 -17
@@ -2631,6 +2631,7 @@
2631 "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->p3AccountActions->p2AccountSecurity->1->0",
2632 "default.handlebars->29->1297",
2633 "default.handlebars->29->1299",
2634 + "default.handlebars->29->2148",
2635 "default.handlebars->29->540",
2636 "default.handlebars->29->542"
2637 ]
@@ -5444,7 +5445,7 @@
5445 "zh-chs": "您确定要{0}插件吗:{1}",
5446 "zh-cht": "你確定要{0}外掛嗎:{1}",
5447 "xloc": [
5447 - "default.handlebars->29->2155"
5448 + "default.handlebars->29->2157"
5449 ]
5450 },
5451 {
@@ -6581,7 +6582,7 @@
6582 "zh-chs": "呼叫错误",
6583 "zh-cht": "呼叫錯誤",
6584 "xloc": [
6584 - "default.handlebars->29->2156"
6585 + "default.handlebars->29->2158"
6586 ]
6587 },
6588 {
@@ -7272,7 +7273,7 @@
7273 "zh-cht": "檢查...",
7274 "xloc": [
7275 "default.handlebars->29->1066",
7275 - "default.handlebars->29->2150"
7276 + "default.handlebars->29->2152"
7277 ]
7278 },
7279 {
@@ -20761,7 +20762,7 @@
20762 "zh-chs": "减",
20763 "zh-cht": "減",
20764 "xloc": [
20764 - "default.handlebars->29->2158"
20765 + "default.handlebars->29->2160"
20766 ]
20767 },
20768 {
@@ -23718,7 +23719,7 @@
23719 "zh-chs": "更多",
23720 "zh-cht": "更多",
23721 "xloc": [
23721 - "default.handlebars->29->2157"
23722 + "default.handlebars->29->2159"
23723 ]
23724 },
23725 {
@@ -27658,7 +27659,7 @@
27659 "zh-cht": "外掛指令",
27660 "xloc": [
27661 "default.handlebars->29->201",
27661 - "default.handlebars->29->2154"
27662 + "default.handlebars->29->2156"
27663 ]
27664 },
27665 {
@@ -37413,11 +37414,7 @@
37414 "ru": "Невозможно получить доступ к устройству, пока адрес email не подтвержден. Это необходимо для восстановления пароля. Перейдите на вкладку \\\"Моя учетная запись\\\", чтобы изменить и подтвердить адрес email.",
37415 "tr": "Bir e-posta adresi doğrulanana kadar bir cihaza erişilemiyor. Bu, şifre kurtarma için gereklidir. Bir e-posta adresini değiştirmek ve doğrulamak için \\\"Hesabım\\\" sekmesine gidin.",
37416 "zh-chs": "在验证电邮地址之前,无法访问设备。这是密码恢复所必需的。转到“我的帐户”标签以更改和验证电邮地址。",
37416 - "zh-cht": "在驗證電郵地址之前,無法訪問裝置。這是密碼恢復所必需的。轉到“我的帳戶”標籤以更改和驗證電郵地址。",
37417 - "xloc": [
37418 - "default.handlebars->29->1298",
37419 - "default.handlebars->29->541"
37420 - ]
37417 + "zh-cht": "在驗證電郵地址之前,無法訪問裝置。這是密碼恢復所必需的。轉到“我的帳戶”標籤以更改和驗證電郵地址。"
37418 },
37419 {
37420 "cs": "Nedaří se získat přístup k zařízení, dokud nebude ověřena e-mailová adresa. To je vyžadováno pro obnovení hesla. Přejděte do „Můj účet“ a změňte si a ověřte e-mailovou adresu.",
@@ -37476,9 +37473,20 @@
37473 "ru": "Невозможно получить доступ к устройству, пока не включена двухфакторная аутентификация. Это требуется для дополнительной безопасности. Перейдите на вкладку \\\"Моя учетная запись\\\" и посмотрите \\\"Безопасность учетной записи\\\".",
37474 "tr": "İki faktörlü kimlik doğrulama etkinleştirilene kadar bir cihaza erişilemez. Bu, ekstra güvenlik için gereklidir. \\\"Hesabım\\\" sekmesine gidin ve \\\"Hesap Güvenliği\\\" bölümüne bakın.",
37475 "zh-chs": "在启用两因素身份验证之前,无法访问设备。这是额外的安全性所必需的。转到“我的帐户”标签,然后查看“帐户安全性”部分。",
37479 - "zh-cht": "在啟用二因子身份驗證之前,無法訪問裝置。這是額外的安全性所必需的。轉到“我的帳戶”標籤,然後查看“帳戶安全性”部分。",
37476 + "zh-cht": "在啟用二因子身份驗證之前,無法訪問裝置。這是額外的安全性所必需的。轉到“我的帳戶”標籤,然後查看“帳戶安全性”部分。"
37477 + },
37478 + {
37479 + "en": "Unable to access this feature until a email address is verified. This is required for password recovery. Go to the \\\"My Account\\\" tab to change and verify an email address.",
37480 + "xloc": [
37481 + "default.handlebars->29->1298",
37482 + "default.handlebars->29->541"
37483 + ]
37484 + },
37485 + {
37486 + "en": "Unable to access this feature until two-factor authentication is enabled. This is required for extra security. Go to the \\\"My Account\\\" tab and look at the \\\"Account Security\\\" section.",
37487 "xloc": [
37488 "default.handlebars->29->1300",
37489 + "default.handlebars->29->2149",
37490 "default.handlebars->29->543"
37491 ]
37492 },
@@ -37976,7 +37984,7 @@
37984 "zh-chs": "最新",
37985 "zh-cht": "最新",
37986 "xloc": [
37979 - "default.handlebars->29->2152"
37987 + "default.handlebars->29->2154"
37988 ]
37989 },
37990 {
@@ -39332,7 +39340,7 @@
39340 "zh-chs": "版本不兼容,请先升级您的MeshCentral",
39341 "zh-cht": "版本不兼容,請先升級你的MeshCentral",
39342 "xloc": [
39335 - "default.handlebars->29->2148"
39343 + "default.handlebars->29->2150"
39344 ]
39345 },
39346 {
@@ -39434,8 +39442,8 @@
39442 "zh-chs": "查看变更日志",
39443 "zh-cht": "查看變更日誌",
39444 "xloc": [
39437 - "default.handlebars->29->2151",
39438 - "default.handlebars->29->2153"
39445 + "default.handlebars->29->2153",
39446 + "default.handlebars->29->2155"
39447 ]
39448 },
39449 {
@@ -41254,7 +41262,7 @@
41262 "zh-chs": "\\\\'",
41263 "zh-cht": "\\\\'",
41264 "xloc": [
41257 - "default.handlebars->29->2149"
41265 + "default.handlebars->29->2151"
41266 ]
41267 },
41268 {
views/default.handlebars
+7 -4
@@ -5703,10 +5703,10 @@
5703 function getCurrentNode() { return currentNode; };
5704 function gotoDevice(nodeid, panel, refresh, event) {
5705 // Remind the user to verify the email address
5706 - if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return; }
5706 + if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Account Security", 1, null, "Unable to access this feature until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return; }
5707
5708 // Remind the user to add two factor authentication
5709 - if ((features & 0x00040000) && (count2factoraAuths() == 0)) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); return; }
5709 + if ((features & 0x00040000) && (count2factoraAuths() == 0)) { setDialogMode(2, "Account Security", 1, null, "Unable to access this feature until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); return; }
5710
5711 if (event && (event.shiftKey == true)) {
5712 // Open the device in a different tab
@@ -9553,10 +9553,10 @@
9553 if ((userinfo.siteadmin != 0xFFFFFFFF) && ((userinfo.siteadmin & 64) != 0)) { setDialogMode(2, "New Device Group", 1, null, "This account does not have the rights to create a new device group."); return false; }
9554
9555 // Remind the user to verify the email address
9556 - if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return false; }
9556 + if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Account Security", 1, null, "Unable to access this feature until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return false; }
9557
9558 // Remind the user to add two factor authentication
9559 - if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0) || ((features & 0x02000000) && (features & 0x04000000) && (userinfo.phone != null)) || ((features & 0x00800000) && (userinfo.otpekey == 1)))) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); return false; }
9559 + if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0) || ((features & 0x02000000) && (features & 0x04000000) && (userinfo.phone != null)) || ((features & 0x00800000) && (userinfo.otpekey == 1)))) { setDialogMode(2, "Account Security", 1, null, "Unable to access this feature until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); return false; }
9560
9561 // We are allowed, let's prompt to information
9562 var x = "Create a new device group using the options below." + '<br /><br />';
@@ -13548,6 +13548,9 @@
13548 }
13549
13550 function go(x, event) {
13551 + // Remind the user to add two factor authentication
13552 + if ((features & 0x00040000) && (count2factoraAuths() == 0) && (x > 2)) { x = 2; setDialogMode(2, "Account Security", 1, null, "Unable to access this feature until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); }
13553 +
13554 if (pluginHandler != null) pluginHandler.callHook('goPageStart', x, event);
13555 setSessionActivity();
13556 if (xxdialogMode) return;