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 3D87267334 for ; Mon, 9 Nov 2020 13:46:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2D56F169BC for ; Mon, 9 Nov 2020 13:46:14 +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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 14B04169B0 for ; Mon, 9 Nov 2020 13:46:13 +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 CED1A45E5F for ; Mon, 9 Nov 2020 13:46:12 +0100 (CET) Date: Mon, 09 Nov 2020 13:46:07 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion , Thomas Lamprecht References: <20201109113107.3943824-1-f.gruenbichler@proxmox.com> <20bb6979-c5d1-c90b-f5e8-2348fcdbec68@proxmox.com> In-Reply-To: <20bb6979-c5d1-c90b-f5e8-2348fcdbec68@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1604925890.4zklh475eo.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.024 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: Re: [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 12:46:44 -0000 On November 9, 2020 1:38 pm, Thomas Lamprecht wrote: > On 09.11.20 12:31, Fabian Gr=C3=BCnbichler wrote: >> since just the ACLs defined on the exact datastore path don't give >> anywhere near a complete picture of who has access to it. >>=20 >=20 >=20 > Seems like an $ anchor is missing, at least I'm getting a permission > on `/datastore/test` listed not only in that datastore view but also in > a datastore called `testnew`. ugh, that's (obviously!) correct, although it's not exactly a missing=20 anchor. I'll send a v2.. >=20 >> Signed-off-by: Fabian Gr=C3=BCnbichler >> --- >> www/config/ACLView.js | 13 ++++++++++++- >> www/datastore/Panel.js | 1 - >> 2 files changed, 12 insertions(+), 2 deletions(-) >>=20 >> 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', { >> =20 >> let params =3D {}; >> if (view.aclPath !=3D=3D undefined) { >> - params.path =3D view.aclPath; >> + let pathFilter =3D Ext.create('Ext.util.Filter', { >> + filterPath: view.aclPath, >> + filterFn: function(item) { >> + let me =3D this; >> + return me.filterPath.startsWith(item.data.path); >> + }, >> + }); >> + view.getStore().addFilter(pathFilter); >> } >> if (view.aclExact !=3D=3D undefined) { >> + if (view.aclPath !=3D=3D undefined) { >> + params.path =3D view.aclPath; >> + } >> params.exact =3D 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}', >> }, >>=20 >=20 >=20 >=20 =