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 access-control 3/5] acl: Add new privilege VM.Reboot
Date: Wed, 16 Sep 2026 11:06:57 +0200	[thread overview]
Message-ID: <20260916090715.72307-4-j.theisen@proxmox.com> (raw)
In-Reply-To: <20260916090715.72307-1-j.theisen@proxmox.com>

Add a new custom privilege to allow Users to Reboot and
Reset VMs but not start or shut them down.

Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 src/PVE/AccessControl.pm | 1 +
 src/test/perm-test1.pl   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm
index 0d632b3..b5f5115 100644
--- a/src/PVE/AccessControl.pm
+++ b/src/PVE/AccessControl.pm
@@ -1165,6 +1165,7 @@ my $privgroups = {
 
 my $valid_privs = {
     'Permissions.Modify' => 1, # not contained in a group
+    'VM.Reboot' => 1, # Custom permission only needed in special cases
 };
 
 my $special_roles = {
diff --git a/src/test/perm-test1.pl b/src/test/perm-test1.pl
index d323447..713095e 100755
--- a/src/test/perm-test1.pl
+++ b/src/test/perm-test1.pl
@@ -86,8 +86,8 @@ check_permission(
         . 'VM.Allocate,VM.Audit,VM.Backup,VM.Clone,VM.Config.CDROM,VM.Config.CPU,VM.Config.Cloudinit,'
         . 'VM.Config.Disk,VM.Config.HWType,VM.Config.Memory,VM.Config.Network,VM.Config.Options,'
         . 'VM.Console,VM.GuestAgent.Audit,VM.GuestAgent.FileRead,VM.GuestAgent.FileSystemMgmt,'
-        . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Replicate,'
-        . 'VM.Snapshot,VM.Snapshot.Rollback',
+        . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Reboot,'
+        . 'VM.Replicate,VM.Snapshot,VM.Snapshot.Rollback',
 );
 
 check_roles('max@pve', '/vms/200', 'storage_manager');
-- 
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 ` Jonas Theisen [this message]
2026-09-16  9:06 ` [PATCH qemu-server 4/5] api: Integrate new privilege VM.Reboot Jonas Theisen
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-4-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