]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
VM.Snapshot.Rollback privilege added
[qemu-server.git] / PVE / API2 / Qemu.pm
index 1002c8755bf555a7d0a44bccd216b07b8d91b505..869eb8c109aeb87883e43b0cbc2483b5adf53a2a 100644 (file)
@@ -2697,7 +2697,10 @@ __PACKAGE__->register_method({
                my $newvollist = [];
 
                eval {
-                   local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = sub { die "interrupted by signal\n"; };
+                   local $SIG{INT} =
+                       local $SIG{TERM} =
+                       local $SIG{QUIT} =
+                       local $SIG{HUP} = sub { die "interrupted by signal\n"; };
 
                    warn "moving disk with snapshots, snapshots will not be moved!\n"
                        if $snapshotted;
@@ -3339,7 +3342,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,
@@ -3378,7 +3381,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,