]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: qemu/HardwareView: check EFI Disk button permissions
authorAaron Lauterer <a.lauterer@proxmox.com>
Mon, 1 Feb 2021 14:21:30 +0000 (15:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Feb 2021 07:36:59 +0000 (08:36 +0100)
Make sure that the `Add EFI Disk` button is disabled if the user does
not have the needed permissions.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
www/manager6/qemu/HardwareView.js

index 26591e620bfc4c271881118b9f5927ef6945bf31..77640e53333d4790519cfe0af7c3682e7b2e9be3 100644 (file)
@@ -561,6 +561,7 @@ Ext.define('PVE.qemu.HardwareView', {
            const noSysConsolePerm = !caps.nodes['Sys.Console'];
            const noVMConfigHWTypePerm = !caps.vms['VM.Config.HWType'];
            const noVMConfigNetPerm = !caps.vms['VM.Config.Network'];
+           const noVMConfigDiskPerm = !caps.vms['VM.Config.Disk'];
 
 
            me.down('#addusb').setDisabled(noSysConsolePerm || isAtLimit('usb'));
@@ -569,7 +570,7 @@ Ext.define('PVE.qemu.HardwareView', {
            me.down('#addserial').setDisabled(noVMConfigHWTypePerm || isAtLimit('serial'));
            me.down('#addnet').setDisabled(noVMConfigNetPerm || isAtLimit('net'));
            me.down('#addrng').setDisabled(noSysConsolePerm || isAtLimit('rng'));
-           efidisk_menuitem.setDisabled(isAtLimit('efidisk'));
+           efidisk_menuitem.setDisabled(noVMConfigDiskPerm || isAtLimit('efidisk'));
            me.down('#addci').setDisabled(noSysConsolePerm || hasCloudInit);
 
            if (!rec) {