]> git.proxmox.com Git - pve-manager.git/commit
api2: network: anybridge: re-add regular bridges
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 27 Apr 2022 11:36:00 +0000 (13:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Apr 2022 11:55:57 +0000 (13:55 +0200)
commitc971330601da8c5c16804adecb768a827e34800f
tree6b37bd03c50fe6e046d9077699fd8d1308a12cc4
parentca65e0990485c55e20bcb24e0aa4f2ada7bf611b
api2: network: anybridge: re-add regular bridges

commit 89d146f207225bb8ca2e01d7e79000bb37a227d1 introduced permission
checks here that caused all regular bridges to be removed from the
returned list as soon as the SDN package is installed, unless the user
is root@pam or there exists a VNET with the same ID.

this is arguably a breaking change, so limit the priv check to actually
defined VNETs for the time being, and add ALL regular bridges
uncondtionally like before.

get_local_vnets already filters by the same prvs, so we need to get the
full config to find out which IDs are VNETs and which are not.

once/iff we introduce ACL paths for *all* bridges in the future, we can
limit accordingly here.

CC: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Network.pm