From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/2] ui: cloudinit: match backend privilege checks
Date: Wed, 3 May 2023 09:52:01 +0200 [thread overview]
Message-ID: <20230503075203.3293562-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20230503075203.3293562-1-f.gruenbichler@proxmox.com>
the cloudinit options except for ipconfig are all modifiable with just
"VM.Config.Cloudinit".
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
www/manager6/qemu/CloudInit.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 77ff93d4..3a1323d1 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -22,8 +22,8 @@ Ext.define('PVE.qemu.CloudInit', {
enableFn: function(record) {
let view = this.up('grid');
var caps = Ext.state.Manager.get('GuiCap');
- if (view.rows[record.data.key].never_delete ||
- !caps.vms['VM.Config.Network']) {
+ let caps_ci = caps.vms['VM.Config.Network'] || caps.vms['VM.Config.Cloudinit'];
+ if (view.rows[record.data.key].never_delete || !caps_ci) {
return false;
}
@@ -242,14 +242,14 @@ Ext.define('PVE.qemu.CloudInit', {
searchdomain: {
header: gettext('DNS domain'),
iconCls: 'fa fa-globe',
- editor: caps.vms['VM.Config.Network'] ? 'PVE.lxc.DNSEdit' : undefined,
+ editor: caps_ci ? 'PVE.lxc.DNSEdit' : undefined,
never_delete: true,
defaultValue: gettext('use host settings'),
},
nameserver: {
header: gettext('DNS servers'),
iconCls: 'fa fa-globe',
- editor: caps.vms['VM.Config.Network'] ? 'PVE.lxc.DNSEdit' : undefined,
+ editor: caps_ci ? 'PVE.lxc.DNSEdit' : undefined,
never_delete: true,
defaultValue: gettext('use host settings'),
},
--
2.30.2
next prev parent reply other threads:[~2023-05-03 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 7:52 [pve-devel] [PATCH manager/qemu-server 0/3] Cloudinit priv adaptations Fabian Grünbichler
2023-05-03 7:52 ` Fabian Grünbichler [this message]
2023-05-03 7:52 ` [pve-devel] [RFC manager 2/2] ui: cloudinit: also allow ipconfig with VM.Config.Cloudinit Fabian Grünbichler
2023-05-03 7:52 ` [pve-devel] [RFC qemu-server 1/1] allow setting ipconfigX " Fabian Grünbichler
2023-06-07 16:24 ` [pve-devel] applied: [PATCH manager/qemu-server 0/3] Cloudinit priv adaptations Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503075203.3293562-2-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox