ui: datastore content: better cope with restricted privs on parent namespaces

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-27 16:09:48 +02:00
parent 069720f510
commit 70493f1823
1 changed files with 13 additions and 6 deletions

View File

@ -196,13 +196,20 @@ Ext.define('PBS.DataStoreContent', {
let me = this;
let view = this.getView();
let namespaces = await me.loadNamespaceFromSameLevel();
if (!success) {
// TODO also check error code for != 403 ?
if (namespaces.length === 0) {
let error = Proxmox.Utils.getResponseErrorMessage(operation.getError());
Proxmox.Utils.setErrorMask(view.down('treeview'), error);
return;
} else {
records = [];
}
} else {
Proxmox.Utils.setErrorMask(view.down('treeview'));
}
let namespaces = await me.loadNamespaceFromSameLevel();
let groups = this.getRecordGroups(records);