public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] www: show more ACLs in datastore panel
Date: Mon,  9 Nov 2020 12:31:07 +0100	[thread overview]
Message-ID: <20201109113107.3943824-1-f.gruenbichler@proxmox.com> (raw)

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 <f.gruenbichler@proxmox.com>
---
 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





             reply	other threads:[~2020-11-09 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 11:31 Fabian Grünbichler [this message]
2020-11-09 12:38 ` Thomas Lamprecht
2020-11-09 12:46   ` Fabian Grünbichler

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=20201109113107.3943824-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-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