Now that the new Sys.AccessNetwork privilege got added to
access-control and the storage download and manager query API
endpoints, the UI should reflect that change and allow opening the
dialogue to download an image from URL also for the users that are
allowed to do so through the new privilege.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
let contents = res.content.split(',');
let enableUpload = !!caps.storage['Datastore.AllocateTemplate'];
- let enableDownloadUrl = enableUpload && !!(caps.nodes['Sys.Audit'] && caps.nodes['Sys.Modify']);
+ let enableDownloadUrl = enableUpload && (
+ !!(caps.nodes['Sys.Audit'] && caps.nodes['Sys.Modify']) || // for backward compat
+ !!caps.nodes['Sys.AccessNetwork'] // new explicit priv for querying (local) networks
+ );
if (contents.includes('backup')) {
me.items.push({