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 1/2] cli: admin: set root@pam as the current auth id
Date: Fri, 28 Nov 2025 11:09:33 +0100	[thread overview]
Message-ID: <20251128100934.186175-2-s.sterz@proxmox.com> (raw)
In-Reply-To: <20251128100934.186175-1-s.sterz@proxmox.com>

otherwise several cli commands relying on the rpc environment
providing a current auth id will fail.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 cli/admin/src/main.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cli/admin/src/main.rs b/cli/admin/src/main.rs
index 831b573..ef72d76 100644
--- a/cli/admin/src/main.rs
+++ b/cli/admin/src/main.rs
@@ -4,6 +4,7 @@ use proxmox_router::cli::{
     default_table_format_options, format_and_print_result_full, get_output_format, run_cli_command,
     CliCommand, CliCommandMap, CliEnvironment, ColumnConfig, OUTPUT_FORMAT,
 };
+use proxmox_router::RpcEnvironment;
 
 use proxmox_schema::api;
 
@@ -27,7 +28,9 @@ fn main() {
         .insert("remote", remotes::cli())
         .insert("versions", CliCommand::new(&API_METHOD_GET_VERSIONS));
 
-    let rpcenv = CliEnvironment::new();
+    let mut rpcenv = CliEnvironment::new();
+    rpcenv.set_auth_id(Some("root@pam".into()));
+
     run_cli_command(
         cmd_def,
         rpcenv,
-- 
2.47.3



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


  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 ` Shannon Sterz [this message]
2025-11-28 10:09 ` [pdm-devel] [PATCH datacenter-manager 2/2] cli: admin: initialize the access control configuration Shannon Sterz
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-2-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