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:
		| @ -196,14 +196,21 @@ Ext.define('PBS.DataStoreContent', { | |||||||
| 	    let me = this; | 	    let me = this; | ||||||
| 	    let view = this.getView(); | 	    let view = this.getView(); | ||||||
|  |  | ||||||
| 	    if (!success) { |  | ||||||
| 		let error = Proxmox.Utils.getResponseErrorMessage(operation.getError()); |  | ||||||
| 		Proxmox.Utils.setErrorMask(view.down('treeview'), error); |  | ||||||
| 		return; |  | ||||||
| 	    } |  | ||||||
|  |  | ||||||
| 	    let namespaces = await me.loadNamespaceFromSameLevel(); | 	    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 groups = this.getRecordGroups(records); | 	    let groups = this.getRecordGroups(records); | ||||||
|  |  | ||||||
| 	    let selected; | 	    let selected; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user