From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9CE1E67285 for ; Mon, 9 Nov 2020 12:31:13 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 910F715E94 for ; Mon, 9 Nov 2020 12:31:13 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 7A0B815E87 for ; Mon, 9 Nov 2020 12:31:12 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4714A45BF1 for ; Mon, 9 Nov 2020 12:31:12 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Date: Mon, 9 Nov 2020 12:31:07 +0100 Message-Id: <20201109113107.3943824-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.025 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup] www: show more ACLs in datastore panel X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 11:31:13 -0000 since just the ACLs defined on the exact datastore path don't give anywhere near a complete picture of who has access to it. Signed-off-by: Fabian Grünbichler --- www/config/ACLView.js | 13 ++++++++++++- www/datastore/Panel.js | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/www/config/ACLView.js b/www/config/ACLView.js index bf1ea6a9..694fcf7b 100644 --- a/www/config/ACLView.js +++ b/www/config/ACLView.js @@ -84,11 +84,22 @@ Ext.define('PBS.config.ACLView', { let params = {}; if (view.aclPath !== undefined) { - params.path = view.aclPath; + let pathFilter = Ext.create('Ext.util.Filter', { + filterPath: view.aclPath, + filterFn: function(item) { + let me = this; + return me.filterPath.startsWith(item.data.path); + }, + }); + view.getStore().addFilter(pathFilter); } if (view.aclExact !== undefined) { + if (view.aclPath !== undefined) { + params.path = view.aclPath; + } params.exact = view.aclExact; } + proxy.setExtraParams(params); Proxmox.Utils.monStoreErrors(view, view.getStore().rstore); }, diff --git a/www/datastore/Panel.js b/www/datastore/Panel.js index 473aa50c..bca663e8 100644 --- a/www/datastore/Panel.js +++ b/www/datastore/Panel.js @@ -90,7 +90,6 @@ Ext.define('PBS.DataStorePanel', { itemId: 'acl', xtype: 'pbsACLView', iconCls: 'fa fa-unlock', - aclExact: true, cbind: { aclPath: '{aclPath}', }, -- 2.20.1