www: show more ACLs in datastore panel
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>
This commit is contained in:
parent
8f7cd96df4
commit
f3b4820d06
@ -84,11 +84,29 @@ 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;
|
||||
let curr = item.data.path;
|
||||
|
||||
if (curr.lastIndexOf("/") < me.filterPath.lastIndexOf("/")) {
|
||||
return me.filterPath.startsWith(curr);
|
||||
} else {
|
||||
return me.filterPath === curr;
|
||||
}
|
||||
},
|
||||
});
|
||||
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);
|
||||
},
|
||||
|
@ -90,7 +90,6 @@ Ext.define('PBS.DataStorePanel', {
|
||||
itemId: 'acl',
|
||||
xtype: 'pbsACLView',
|
||||
iconCls: 'fa fa-unlock',
|
||||
aclExact: true,
|
||||
cbind: {
|
||||
aclPath: '{aclPath}',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user