[pve-devel] [PATCH manager 15/17] hide migrate in contextmenu when no cluster or no rights

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Aug 23 11:38:15 CEST 2017


On 08/23/2017 11:27 AM, Thomas Lamprecht wrote:

> diff --git a/www/manager6/qemu/CmdMenu.js b/www/manager6/qemu/CmdMenu.js
> index 0fb832d4..c76c511b 100644
> --- a/www/manager6/qemu/CmdMenu.js
> +++ b/www/manager6/qemu/CmdMenu.js
> @@ -111,7 +111,10 @@ Ext.define('PVE.qemu.CmdMenu', {
>                      });
>                  }
>              },
> -           { xtype: 'menuseparator' },
> +           {
> +               xtype: 'menuseparator',
> +               hidden: !((standalone || caps.vms['VM.Migrate']) || caps.vms['VM.Allocate'] || caps.vms['VM.Clone'])

small typo here from me, missing negation ~^~~~~
   +               hidden: !((standalone || !caps.vms['VM.Migrate']) || caps.vms['VM.Allocate'] || caps.vms['VM.Clone'])





More information about the pve-devel mailing list