mirror of
git://git.proxmox.com/git/pve-network.git
synced 2025-04-30 11:27:11 +02:00
api: vnet: fix warning in vnet API
If zone is not set, we also check the pending changes for a zone key, since it is set as pending when the Vnet settings have not yet been applied. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
parent
fb97ed300a
commit
2664f29575
|
@ -123,7 +123,7 @@ __PACKAGE__->register_method ({
|
|||
foreach my $id (@sids) {
|
||||
my $privs = [ 'SDN.Audit', 'SDN.Allocate' ];
|
||||
my $scfg = &$api_sdn_vnets_config($cfg, $id);
|
||||
my $zoneid = $scfg->{zone};
|
||||
my $zoneid = $scfg->{zone} // $scfg->{pending}->{zone};
|
||||
next if !$rpcenv->check_any($authuser, "/sdn/zones/$zoneid/$id", $privs, 1);
|
||||
|
||||
push @$res, $scfg;
|
||||
|
|
Loading…
Reference in a new issue