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 20a971d5afe2e33495444773dda1196f8c567340 Author: Harikrishna Patnala <harikrishna.patn...@gmail.com> AuthorDate: Sun Nov 27 08:26:10 2022 +0530 icons for 2FA providers --- ui/public/locales/en.json | 2 +- ui/src/core/lazy_lib/icons_use.js | 2 ++ ui/src/views/dashboard/SetupTwoFaAtLogin.vue | 3 +-- ui/src/views/iam/RegisterTwoFactorAuth.vue | 24 +++++++++++++++++++++++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 31f9783dded..cb3508e47ae 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -2591,7 +2591,7 @@ "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. 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.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/core/lazy_lib/icons_use.js b/ui/src/core/lazy_lib/icons_use.js index 39627ed76ef..6fce9dd2cb8 100644 --- a/ui/src/core/lazy_lib/icons_use.js +++ b/ui/src/core/lazy_lib/icons_use.js @@ -90,6 +90,7 @@ import { GithubOutlined, GlobalOutlined, GoldOutlined, + GoogleOutlined, HddOutlined, HomeOutlined, IdcardOutlined, @@ -238,6 +239,7 @@ export default { app.component('GithubOutlined', GithubOutlined) app.component('GlobalOutlined', GlobalOutlined) app.component('GoldOutlined', GoldOutlined) + app.component('GoogleOutlined', GoogleOutlined) app.component('HddOutlined', HddOutlined) app.component('HomeOutlined', HomeOutlined) app.component('IdcardOutlined', IdcardOutlined) diff --git a/ui/src/views/dashboard/SetupTwoFaAtLogin.vue b/ui/src/views/dashboard/SetupTwoFaAtLogin.vue index 0c1d8202974..a3f7312530a 100644 --- a/ui/src/views/dashboard/SetupTwoFaAtLogin.vue +++ b/ui/src/views/dashboard/SetupTwoFaAtLogin.vue @@ -46,8 +46,7 @@ @change="val => { handleSelectChange(val) }"> <a-select-option v-for="(opt) in providers" - :key="opt.name" - :disabled="opt.enabled === false"> + :key="opt.name"> {{ opt.name }} </a-select-option> </a-select> diff --git a/ui/src/views/iam/RegisterTwoFactorAuth.vue b/ui/src/views/iam/RegisterTwoFactorAuth.vue index 7404a58613a..c8f9641ca05 100644 --- a/ui/src/views/iam/RegisterTwoFactorAuth.vue +++ b/ui/src/views/iam/RegisterTwoFactorAuth.vue @@ -34,12 +34,34 @@ <a-select-option v-for="(opt) in providers" :key="opt.name" - :disabled="opt.enabled === false"> + :value="opt.name"> + <div> + <span v-if="opt.name === 'google'"> + <google-outlined /> + </span> + <span v-if="opt.name === 'staticpin'"> + <google-outlined /> + </span> {{ opt.name }} + </div> </a-select-option> </a-select> <div :span="24" v-if="selectedProvider"> <a-button ref="submit" type="primary" @click="setup2FAProvider">{{ $t('label.setup') }}</a-button> + <tooltip-button + tooltipPlacement="top" + :tooltip="$t('label.accept.project.invitation')" + icon="check-outlined" + size="small" + @onClick="setup2FAProvider()"/> + <tooltip-button + tooltipPlacement="top" + :tooltip="$t('label.decline.invitation')" + type="primary" + :danger="true" + icon="close-outlined" + size="small" + @onClick="setup2FAProvider()"/> </div> </div> <div v-if="twoFAenabled">