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

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


VM.Snapshot.Rollback privilege added

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

diff --git a/src/PVE/API2/LXC/Snapshot.pm b/src/PVE/API2/LXC/Snapshot.pm
index 6ba6fb3..edccbf4 100644
--- a/src/PVE/API2/LXC/Snapshot.pm
+++ b/src/PVE/API2/LXC/Snapshot.pm
@@ -225,7 +225,7 @@ __PACKAGE__->register_method({
     proxyto => 'node',
     description => "Rollback LXC 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,
@@ -328,7 +328,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,
-- 
2.14.1




More information about the pve-devel mailing list