public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 1/2] ui: qemu|lxc : fix firewall menu caps
Date: Mon, 27 Mar 2023 12:18:21 +0200	[thread overview]
Message-ID: <20230327101822.3082769-3-aderumier@odiso.com> (raw)
In-Reply-To: <20230327101822.3082769-1-aderumier@odiso.com>

The current Vm.Console caps is wrong.

Only log api need Vm.Console

other api call need Vm.Audit or VM.Config.Network

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 www/manager6/lxc/Config.js  | 7 ++++++-
 www/manager6/qemu/Config.js | 9 +++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js
index 23c17d2e..85d32e3c 100644
--- a/www/manager6/lxc/Config.js
+++ b/www/manager6/lxc/Config.js
@@ -304,7 +304,7 @@ Ext.define('PVE.lxc.Config', {
 	    });
 	}
 
-	if (caps.vms['VM.Console']) {
+	if (caps.vms['VM.Audit']) {
 	    me.items.push(
 		{
 		    xtype: 'pveFirewallRules',
@@ -342,6 +342,11 @@ Ext.define('PVE.lxc.Config', {
 		    list_refs_url: base_url + '/firewall/refs',
 		    itemId: 'firewall-ipset',
 		},
+	    );
+	}
+
+	if (caps.vms['VM.Console']) {
+	    me.items.push(
 		{
 		    title: gettext('Log'),
 		    groups: ['firewall'],
diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js
index 94c540c5..6acf589c 100644
--- a/www/manager6/qemu/Config.js
+++ b/www/manager6/qemu/Config.js
@@ -339,7 +339,7 @@ Ext.define('PVE.qemu.Config', {
 	    });
 	}
 
-	if (caps.vms['VM.Console']) {
+	if (caps.vms['VM.Audit']) {
 	    me.items.push(
 		{
 		    xtype: 'pveFirewallRules',
@@ -377,7 +377,12 @@ Ext.define('PVE.qemu.Config', {
 		    list_refs_url: base_url + '/firewall/refs',
 		    itemId: 'firewall-ipset',
 		},
-		{
+	    );
+	}
+
+	if (caps.vms['VM.Console']) {
+            me.items.push(
+                {
 		    title: gettext('Log'),
 		    groups: ['firewall'],
 		    iconCls: 'fa fa-list',
-- 
2.30.2




  parent reply	other threads:[~2023-03-27 10:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 10:18 [pve-devel] [PATCH-SERIES pve-access-control/pve-manager] Add firewall caps Alexandre Derumier
2023-03-27 10:18 ` [pve-devel] [PATCH pve-access-control 1/1] rpcenv: compute_api_permission : add default root dc.Sys.Modify Alexandre Derumier
2023-06-07 10:04   ` [pve-devel] applied: " Thomas Lamprecht
2023-03-27 10:18 ` Alexandre Derumier [this message]
2023-06-07 11:24   ` [pve-devel] applied: [PATCH pve-manager 1/2] ui: qemu|lxc : fix firewall menu caps Dominik Csapak
2023-03-27 10:18 ` [pve-devel] [PATCH pve-manager 2/2] ui: firewall panel/grids : add caps on buttons Alexandre Derumier

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=20230327101822.3082769-3-aderumier@odiso.com \
    --to=aderumier@odiso.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal