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

DaanHoogland pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new b16340399ba fix: show re-enable 2FA button when is2faenabled is 
null/undefined
b16340399ba is described below

commit b16340399baed5faec14bf01b6fb99f40ce63c58
Author: dahn <[email protected]>
AuthorDate: Tue May 26 14:59:07 2026 +0200

    fix: show re-enable 2FA button when is2faenabled is null/undefined
    
    After disabling 2FA via setupUserTwoFactorAuthentication, the API may
    return is2faenabled as null or undefined rather than boolean false.
    The strict equality check (=== false) prevented the "Setup 2FA" button
    from appearing in those cases, making it impossible to re-enable 2FA.
    
    Change the check to a falsy check (!record.is2faenabled) so the button
    is shown whenever 2FA is not enabled, regardless of whether the value
    is false, null, or undefined.
    
    Fixes: https://github.com/apache/cloudstack/issues/13233
---
 ui/src/config/section/user.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/config/section/user.js b/ui/src/config/section/user.js
index a298033bd96..eaaca983dc0 100644
--- a/ui/src/config/section/user.js
+++ b/ui/src/config/section/user.js
@@ -179,7 +179,7 @@ export default {
       dataView: true,
       popup: true,
       show: (record, store) => {
-        return (record.is2faenabled === false && record.id === 
store.userInfo.id)
+        return (!record.is2faenabled && record.id === store.userInfo.id)
       },
       component: shallowRef(defineAsyncComponent(() => 
import('@/views/iam/SetupTwoFaAtUserProfile.vue')))
     },

Reply via email to