public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 2/2] cli: admin: initialize the access control configuration
Date: Fri, 28 Nov 2025 11:09:34 +0100	[thread overview]
Message-ID: <20251128100934.186175-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20251128100934.186175-1-s.sterz@proxmox.com>

otherwise it will just panic.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 cli/admin/Cargo.toml  | 2 ++
 cli/admin/src/main.rs | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/cli/admin/Cargo.toml b/cli/admin/Cargo.toml
index 17155a8..0dec423 100644
--- a/cli/admin/Cargo.toml
+++ b/cli/admin/Cargo.toml
@@ -18,7 +18,9 @@ proxmox-log.workspace = true
 proxmox-product-config.workspace = true
 proxmox-router = { workspace = true, features = [ "cli" ], default-features = false }
 proxmox-schema = { workspace = true, features = [ "api-macro" ] }
+proxmox-access-control.workspace = true
 
 pdm-api-types.workspace = true
 pdm-config.workspace = true
+pdm-buildcfg.workspace = true
 server.workspace = true
diff --git a/cli/admin/src/main.rs b/cli/admin/src/main.rs
index ef72d76..19d387f 100644
--- a/cli/admin/src/main.rs
+++ b/cli/admin/src/main.rs
@@ -17,6 +17,12 @@ fn main() {
     let priv_user = pdm_config::priv_user().expect("cannot get privileged user");
     proxmox_product_config::init(api_user, priv_user);
 
+    proxmox_access_control::init::init(
+        &pdm_api_types::AccessControlConfig,
+        pdm_buildcfg::configdir!("/access"),
+    )
+    .expect("failed to setup access control config");
+
     proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO)
         .stderr()
         .init()
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  parent reply	other threads:[~2025-11-28 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 10:09 [pdm-devel] [PATCH datacenter-manager 0/2] set up proxmox-datacenter-manager-admin properly Shannon Sterz
2025-11-28 10:09 ` [pdm-devel] [PATCH datacenter-manager 1/2] cli: admin: set root@pam as the current auth id Shannon Sterz
2025-11-28 10:09 ` Shannon Sterz [this message]
2025-11-28 10:58 ` [pdm-devel] [PATCH datacenter-manager 0/2] set up proxmox-datacenter-manager-admin properly Lukas Wagner
2025-11-28 18:53 ` [pdm-devel] applied: " Thomas Lamprecht

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=20251128100934.186175-3-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pdm-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