public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jonas Theisen <j.theisen@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 4/5] api: Integrate new privilege VM.Reboot
Date: Wed, 16 Sep 2026 11:06:58 +0200	[thread overview]
Message-ID: <20260916090715.72307-5-j.theisen@proxmox.com> (raw)
In-Reply-To: <20260916090715.72307-1-j.theisen@proxmox.com>

Allow users with the new VM.Reboot privilege to reboot and
reset a VM but not start or shut it down.

Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 src/PVE/API2/Qemu.pm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 71247eec..ae8ce40f 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -3808,7 +3808,11 @@ __PACKAGE__->register_method({
     proxyto => 'node',
     description => "Reset virtual machine.",
     permissions => {
-        check => ['perm', '/vms/{vmid}', ['VM.PowerMgmt']],
+        check => [
+            'or',
+            ['perm', '/vms/{vmid}', ['VM.PowerMgmt']],
+            ['perm', '/vms/{vmid}', ['VM.Reboot']],
+        ],
     },
     parameters => {
         additionalProperties => 0,
@@ -3978,7 +3982,11 @@ __PACKAGE__->register_method({
     description =>
         "Reboot the VM by shutting it down, and starting it again. Applies pending changes.",
     permissions => {
-        check => ['perm', '/vms/{vmid}', ['VM.PowerMgmt']],
+        check => [
+            'or',
+            ['perm', '/vms/{vmid}', ['VM.PowerMgmt']],
+            ['perm', '/vms/{vmid}', ['VM.Reboot']],
+        ],
     },
     parameters => {
         additionalProperties => 0,
-- 
2.47.3





  parent reply	other threads:[~2026-09-16  9:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  9:06 [PATCH access-control/docs/manager/qemu-server 0/5] Add new permission VM.Reboot Jonas Theisen
2026-09-16  9:06 ` [PATCH manager 1/5] ui: integrate new VM.Reboot permission Jonas Theisen
2026-09-16  9:06 ` [PATCH manager 2/5] ui: align VM context menu to permissions Jonas Theisen
2026-09-16  9:06 ` [PATCH access-control 3/5] acl: Add new privilege VM.Reboot Jonas Theisen
2026-09-16  9:06 ` Jonas Theisen [this message]
2026-09-16  9:06 ` [PATCH docs 5/5] pveum: VM permissions: add VM.Reboot Jonas Theisen

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=20260916090715.72307-5-j.theisen@proxmox.com \
    --to=j.theisen@proxmox.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