You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ha...@apache.org on 2022/11/28 04:03:23 UTC

[cloudstack] 02/02: Message improvements

This is an automated email from the ASF dual-hosted git repository.

harikrishna pushed a commit to branch 2FA
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 3782d9d4df93ac90439d763efd3cf888aa993d4e
Author: Harikrishna Patnala <ha...@gmail.com>
AuthorDate: Mon Nov 28 08:49:22 2022 +0530

    Message improvements
---
 server/src/main/java/com/cloud/user/AccountManagerImpl.java | 2 +-
 ui/public/locales/en.json                                   | 5 ++++-
 ui/src/views/dashboard/SetupTwoFaAtLogin.vue                | 6 ++++--
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/server/src/main/java/com/cloud/user/AccountManagerImpl.java b/server/src/main/java/com/cloud/user/AccountManagerImpl.java
index 85d3e470f08..1941ff1b1a0 100644
--- a/server/src/main/java/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/main/java/com/cloud/user/AccountManagerImpl.java
@@ -3167,7 +3167,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
 
     @Override
     public ConfigKey<?>[] getConfigKeys() {
-        return new ConfigKey<?>[] {UseSecretKeyInResponse, enableUserTwoFactorAuthentication, userTwoFactorAuthenticationProviderPlugin};
+        return new ConfigKey<?>[] {UseSecretKeyInResponse, enableUserTwoFactorAuthentication, userTwoFactorAuthenticationProviderPlugin, mandateUserTwoFactorAuthentication};
     }
 
     public List<UserTwoFactorAuthenticator> getUserTwoFactorAuthenticationProviders() {
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index cb3508e47ae..54854457af3 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -2591,7 +2591,10 @@
 "message.traffic.type.to.basic.zone": "traffic type to basic zone",
 "message.two.fa.auth": "<br>1. Open the authenticator application on your device <br>2. Enter the authentication code of the user to verify",
 "message.two.fa.register.account": "1. Open the authenticator application on your device <br>2. Scan the below QR code to add the user <br>3. If you cannot scan the QR code, enter the setup key manually <br>4. Verification of the 2FA code is mandatory to complete the 2FA setup",
-"message.two.fa.staticpin": "1. Use the generated static pin as 2FA code for two factor authentication<br>2. Save this static pin/2FA code and do not share<br>3. Verification of the 2FA code is mandatory to complete the 2FA setup",
+"message.two.fa.staticpin": "1. Use the generated static pin as 2FA code for two factor authentication<br>2. Save this static pin/2FA code and do not share. This code will be used for subsequent logins<br>3. Verification of the 2FA code is mandatory to complete the 2FA setup",
+"message.two.fa.register.account.login.page": "1. 2FA is configured on your account <br>2. Open the authenticator application on your device <br>3. Scan the below QR code to add the user <br>4. If you cannot scan the QR code, enter the setup key manually <br>5. Verify the 2FA code to continue to login",
+"message.two.fa.staticpin.login.page": "1. 2FA is configured on your account <br>2. Use the generated static pin as 2FA code for two factor authentication<br>3. Save this static pin/2FA code and do not share. This code will be used for subsequent logins<br>4. Verify the 2FA code to continue to login",
+"message.two.fa.login.page": "1. Two factor authentication 2FA is enabled on your account<br>2. You need to select a provider and setup 2FA<br>",
 "message.two.fa.view.setup.key": "Click here to view the setup key",
 "message.two.fa.view.static.pin": "Click here to view the static pin",
 "message.update.ipaddress.processing": "Updating IP Address...",
diff --git a/ui/src/views/dashboard/SetupTwoFaAtLogin.vue b/ui/src/views/dashboard/SetupTwoFaAtLogin.vue
index 1747570330b..faa1d74454b 100644
--- a/ui/src/views/dashboard/SetupTwoFaAtLogin.vue
+++ b/ui/src/views/dashboard/SetupTwoFaAtLogin.vue
@@ -30,6 +30,8 @@
       <br />
       <br />
     </a-form>
+    <p v-html="$t('message.two.fa.login.page')"></p>
+    <br />
     <h3> {{ $t('label.select.2fa.provider') }} </h3>
     <a-form
       :rules="rules"
@@ -66,7 +68,7 @@
       <div v-if="twoFAenabled">
         <div v-if="selectedProvider !== 'staticpin'">
           <br />
-          <p v-html="$t('message.two.fa.register.account')"></p>
+          <p v-html="$t('message.two.fa.register.account.login.page')"></p>
           <vue-qrious
             class="center-align"
             :value="googleUrl"
@@ -76,7 +78,7 @@
         </div>
         <div v-if="selectedProvider === 'staticpin'">
           <br>
-          <p v-html="$t('message.two.fa.staticpin')"></p>
+          <p v-html="$t('message.two.fa.staticpin.login.page')"></p>
           <br>
           <div> <a @click="showConfiguredPin"> {{ $t('message.two.fa.view.static.pin') }}</a></div>
         </div>