[pve-devel] [PULL 1/4] Allow non-root to use start/stop/migrate all buttons
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Mar 18 09:30:28 CET 2016
From: Caspar Smit <casparsmit at supernas.eu>
Signed-off-by: Caspar Smit <casparsmit at supernas.eu>
Reviewed-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
PVE/API2/Nodes.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 68496d7..d4af788 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -1225,6 +1225,9 @@ __PACKAGE__->register_method ({
path => 'startall',
method => 'POST',
protected => 1,
+ permissions => {
+ check => ['perm', '/', [ 'VM.PowerMgmt' ]],
+ },
proxyto => 'node',
description => "Start all VMs and containers (when onboot=1).",
parameters => {
@@ -1350,6 +1353,9 @@ __PACKAGE__->register_method ({
path => 'stopall',
method => 'POST',
protected => 1,
+ permissions => {
+ check => ['perm', '/', [ 'VM.PowerMgmt' ]],
+ },
proxyto => 'node',
description => "Stop all VMs and Containers.",
parameters => {
@@ -1463,6 +1469,9 @@ __PACKAGE__->register_method ({
method => 'POST',
proxyto => 'node',
protected => 1,
+ permissions => {
+ check => ['perm', '/', [ 'VM.Migrate' ]],
+ },
description => "Migrate all VMs and Containers.",
parameters => {
additionalProperties => 0,
--
2.1.4
More information about the pve-devel
mailing list