public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Azharul Haque <haque@azharul.com>
To: pve-devel@lists.proxmox.com
Cc: haque@azharul.com
Subject: [PATCH 1/2] fix #4281: access: add `type` property to `PveAccessDomainModel`
Date: Mon, 10 Aug 2026 01:37:31 -0400	[thread overview]
Message-ID: <20260810053732.16627-2-haque@azharul.com> (raw)
In-Reply-To: <20260810053732.16627-1-haque@azharul.com>

The realm/domain list returned by /access/domains always includes a
`type` field (pam, pve, ldap, ad, openid, ...), but the model never
captured it. Without it, callers have no way to tell an OpenID Connect
realm apart from a password-based one, which is why the login form
falls back to showing username/password fields even for realms that
require a browser-based OpenID login.

Add the property and an `isOpenIdRealm` convenience getter, used by
the login form in the following commits.

Signed-off-by: Azharul Haque <haque@azharul.com>
---
 lib/src/models/pve_access_domain_model.dart | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/src/models/pve_access_domain_model.dart b/lib/src/models/pve_access_domain_model.dart
index 6298bbe..a2fff31 100644
--- a/lib/src/models/pve_access_domain_model.dart
+++ b/lib/src/models/pve_access_domain_model.dart
@@ -7,12 +7,14 @@ abstract class PveAccessDomainModel
     implements Built<PveAccessDomainModel, PveAccessDomainModelBuilder> {
   // Fields
   String get realm;
+  String get type;
   String? get comment;
   String? get tfa;
   @BuiltValueField(wireName: 'default')
   int? get defaultValue;
 
   bool get isDefaultRealm => defaultValue == 1;
+  bool get isOpenIdRealm => type == 'openid';
 
   PveAccessDomainModel._();
 
-- 
2.50.1 (Apple Git-155)




  reply	other threads:[~2026-08-10 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  5:37 [PATCH 0/2] access: add OpenID Connect support for #4281 Azharul Haque
2026-08-10  5:37 ` Azharul Haque [this message]
2026-08-10  5:37 ` [PATCH 2/2] fix #4281: access: add OpenID Connect auth-url/login helpers Azharul Haque

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260810053732.16627-2-haque@azharul.com \
    --to=haque@azharul.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal