[pve-devel] [PATCH proxmox_dart_api_client v2 1/2] fix #6409: add `default` property to `PveAccessDomainModel`
Shan Shaji
s.shaji at proxmox.com
Mon May 26 17:41:36 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 `default` property and creates a getter boolean
that internally checks if the realm is default. This boolean is
used inside `pve_login_form.dart`, which is part of pve_login_manager.
Also the `default` property is named as `defaultValue` as `default` is
a keyword [0] in dart.
- [0] https://dart.dev/language/keywords
Signed-off-by: Shan Shaji <s.shaji at proxmox.com>
---
lib/src/models/pve_access_domain_model.dart | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/src/models/pve_access_domain_model.dart b/lib/src/models/pve_access_domain_model.dart
index 81cb7a4..6298bbe 100644
--- a/lib/src/models/pve_access_domain_model.dart
+++ b/lib/src/models/pve_access_domain_model.dart
@@ -9,6 +9,11 @@ abstract class PveAccessDomainModel
String get realm;
String? get comment;
String? get tfa;
+ @BuiltValueField(wireName: 'default')
+ int? get defaultValue;
+
+ bool get isDefaultRealm => defaultValue == 1;
+
PveAccessDomainModel._();
factory PveAccessDomainModel(
--
2.39.5
More information about the pve-devel
mailing list