[pve-devel] [PATCH proxmox_login_manager v2 2/2] fix #6409: add `isDefaultRealm` check to pre-select realm in login form
    Shan Shaji 
    s.shaji at proxmox.com
       
    Mon May 26 17:41:37 CEST 2025
    
    
  
When the `default` property was selected inside the realm of the web
UI, the app's login page was not showing the default realm instead,
it was always showing PAM.
This commit adds the `isDefaultRealm` boolean check to find the
default realm.
Signed-off-by: Shan Shaji <s.shaji at proxmox.com>
---
 
 changes since v1:
 * generated the patch again by comparing with master
 lib/proxmox_login_form.dart | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart
index 5916563..4ed495d 100644
--- a/lib/proxmox_login_form.dart
+++ b/lib/proxmox_login_form.dart
@@ -697,7 +697,7 @@ class _ProxmoxLoginPageState extends State<ProxmoxLoginPage> {
     response?.sort((a, b) => a!.realm.compareTo(b!.realm));
 
     final selection = response?.singleWhere(
-      (e) => e!.realm == widget.userModel?.realm,
+      (e) => e!.realm == widget.userModel?.realm || e.isDefaultRealm,
       orElse: () => response?.first,
     );
 
-- 
2.39.5
    
    
More information about the pve-devel
mailing list