[pve-devel] [PATCH 1/3] Allow non-root to use start/stop/migrate all buttons
    Thomas Lamprecht 
    t.lamprecht at proxmox.com
       
    Mon Mar 14 09:28:02 CET 2016
    
    
  
Hi,
first thanks for your contribution!
We use the Harmony CLA for contributions:
http://www.harmonyagreements.org/
See:
https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright
for more information.
Please send a signed CLA to office at proxmox.com (or per Mail/Fax if
preferred)
Else this patch looks good to me!
On Fri, 11 Mar 2016 06:59:06 -0500
Caspar Smit <casparsmit at supernas.eu> wrote:
> 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,
    
    
More information about the pve-devel
mailing list