[pve-devel] [PATCH qemu-server] VM.Snapshot.Rollback privilege added

Matthias Urban matthias.urban at pure-systems.com
Wed Sep 13 12:30:37 CEST 2017


VM.Snapshot.Rollback privilege added

Signed-off-by: Matthias Urban <matthias.urban at pure-systems.com>
---
 PVE/API2/Qemu.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index aa7c832..311295b 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -3354,7 +3354,7 @@ __PACKAGE__->register_method({
     proxyto => 'node',
     description => "Get snapshot configuration",
     permissions => {
-	check => ['perm', '/vms/{vmid}', [ 'VM.Snapshot' ]],
+	check => ['perm', '/vms/{vmid}', [ 'VM.Snapshot', 'VM.Snapshot.Rollback' ], any => 1],
     },
     parameters => {
 	additionalProperties => 0,
@@ -3393,7 +3393,7 @@ __PACKAGE__->register_method({
     proxyto => 'node',
     description => "Rollback VM state to specified snapshot.",
     permissions => {
-	check => ['perm', '/vms/{vmid}', [ 'VM.Snapshot' ]],
+	check => ['perm', '/vms/{vmid}', [ 'VM.Snapshot', 'VM.Snapshot.Rollback' ], any => 1],
     },
     parameters => {
 	additionalProperties => 0,
-- 
2.14.1




More information about the pve-devel mailing list