Show configured MFA status and add CLI reset commands (#1196)

The administrator list shows a translated Yes/No MFA column immediately after Active. 
Domains display an MFA badge only when at least one mailbox has a configured secret. 

Add resetmfa task for the postfixadmin-cli command. ( postfixadmin-cli admin resetmfa <address> and
postfixadmin-cli mailbox resetmfa <address> )

thanks @TrapoSAMA
This commit is contained in:
Rodrigo Cortés Cano authored and GitHub committed 2026-11-18 13:22:21 +00:00
1 parent f3ffeae493
commit 1eaaecfcbc
53 files changed
+343 -4

No files matched your search

+3
View File
@@ -113,6 +113,9 @@ class DomainHandler extends PFAHandler
# editing? form list
'domain' => self::pacol($this->new, 1, 1, 'text', 'domain' , '' ,'', array(), 0, 0, "", "", 'list-virtual.php?domain=%s'),
'full_mailbox_count' => self::pacol(0, 0, 1, 'vnum', '' , '' , '', array(), 0, 0, 'coalesce(__full_mailbox_count,0) as full_mailbox_count'),
'mfa' => self::pacol(0, 0, 1, 'vnum', '', '', 0, [], 0, 1,
'CASE WHEN EXISTS (SELECT 1 FROM ' . table_by_key('mailbox') . ' AS mfa_mailbox'
. ' WHERE mfa_mailbox.domain = ' . table_by_key('domain') . ".domain AND mfa_mailbox.totp_secret IS NOT NULL AND mfa_mailbox.totp_secret <> '') THEN 1 ELSE 0 END AS mfa"),
'dns_active' => self::pacol(0, 0, 1, 'bool', '' , ''),
'dns_checked' => self::pacol(0, 0, 1, 'ts', '' , '', null),
'description' => self::pacol($super, $super, $super, 'text', 'description' , ''),