[pve-devel] [PATCH manager 7/7] ui: qemu/HardwareView: add CDROM permission check to edit button
Aaron Lauterer
a.lauterer at proxmox.com
Mon Feb 1 15:21:31 CET 2021
Add CDROM permission check to disable the Edit button if they are not
present.
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
www/manager6/qemu/HardwareView.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 252a8e72..56bdc0a1 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -600,7 +600,11 @@ Ext.define('PVE.qemu.HardwareView', {
remove_btn.setText(isUsedDisk && !isCloudInit ? remove_btn.altText : remove_btn.defaultText);
remove_btn.RESTMethod = isUnusedDisk ? 'POST':'PUT';
- edit_btn.setDisabled(rec.data.delete || !rowdef.editor || isCloudInit || (!isCDRom && !diskCap));
+ edit_btn.setDisabled(rec.data.delete ||
+ !rowdef.editor ||
+ isCloudInit ||
+ !caps.vms['VM.Config.CDROM'] ||
+ (!isCDRom && !diskCap));
resize_btn.setDisabled(pending || !isUsedDisk || !diskCap);
--
2.20.1
More information about the pve-devel
mailing list