From 378b359eef08e3306f484322f12a6d718e617e06 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 23 Jan 2012 11:59:28 +0100 Subject: [PATCH] use new syntax for permission attribute --- PVE/API2/Qemu.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 8b972a33..669be57f 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -278,8 +278,7 @@ __PACKAGE__->register_method({ method => 'GET', protected => 1, # fixme: can we avoid that? permissions => { - path => '/vms/{vmid}', - privs => [ 'VM.Audit' ], + check => ['perm', '/vms/{vmid}', [ 'VM.Audit' ]], }, description => "Read VM RRD statistics (returns PNG)", parameters => { @@ -325,8 +324,7 @@ __PACKAGE__->register_method({ method => 'GET', protected => 1, # fixme: can we avoid that? permissions => { - path => '/vms/{vmid}', - privs => [ 'VM.Audit' ], + check => ['perm', '/vms/{vmid}', [ 'VM.Audit' ]], }, description => "Read VM RRD statistics", parameters => { @@ -700,8 +698,7 @@ __PACKAGE__->register_method({ method => 'POST', protected => 1, permissions => { - path => '/vms/{vmid}', - privs => [ 'VM.Console' ], + check => ['perm', '/vms/{vmid}', [ 'VM.Console' ]], }, description => "Creates a TCP VNC proxy connections.", parameters => {