feat: add global toggles for TOTP and Email 2FA in system settings, conditionally show/hide user 2FA tab

This commit is contained in:
2026-05-21 22:05:14 +07:00
parent 6c582282ac
commit 1a30122c3d
41 changed files with 348 additions and 285 deletions
@@ -31,6 +31,10 @@ class SystemSettingController extends Controller
'password_require_numbers' => '0',
'password_require_mixed_case' => '0',
// Two Factor global toggles
'two_factor_totp_enabled' => '1',
'two_factor_email_enabled' => '1',
// OAuth
'oauth_google_enabled' => '0',
'oauth_google_client_id' => '',
@@ -83,6 +87,9 @@ class SystemSettingController extends Controller
'settings.password_require_numbers' => 'boolean',
'settings.password_require_mixed_case' => 'boolean',
'settings.two_factor_totp_enabled' => 'boolean',
'settings.two_factor_email_enabled' => 'boolean',
'settings.oauth_google_enabled' => 'boolean',
'settings.oauth_google_client_id' => 'nullable|string',
'settings.oauth_google_client_secret' => 'nullable|string',