From: Dominik Csapak Date: Wed, 21 Jun 2023 10:05:09 +0000 (+0200) Subject: api: resource usb mapping: add missing proxyto_callback X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d958b1306fc8b83629b8584e23fad7989087dab8;p=pve-manager.git api: resource usb mapping: add missing proxyto_callback i have added it to the pci api call, but forgot to add it for usb otherwise adding a mapped usb device only works on the node where the gui is connected to Signed-off-by: Dominik Csapak --- diff --git a/PVE/API2/Cluster/Mapping/USB.pm b/PVE/API2/Cluster/Mapping/USB.pm index 5495bce2..763d5c2b 100644 --- a/PVE/API2/Cluster/Mapping/USB.pm +++ b/PVE/API2/Cluster/Mapping/USB.pm @@ -15,6 +15,11 @@ __PACKAGE__->register_method ({ name => 'index', path => '', method => 'GET', + # only proxy if we give the 'check-node' parameter + proxyto_callback => sub { + my ($rpcenv, $proxyto, $param) = @_; + return $param->{'check-node'} // 'localhost'; + }, description => "List USB Hardware Mappings", permissions => { description => "Only lists entries where you have 'Mapping.Modify', 'Mapping.Use' or".