]> git.proxmox.com Git - qemu-server.git/commit
reassign disk: fix permission checks
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 10 Nov 2021 10:20:20 +0000 (11:20 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 10 Nov 2021 10:49:36 +0000 (11:49 +0100)
commit441024921e06c8162b941d0e9b2cb93785a6671e
tree3450ea0aeaf1f2ad1180a72a24d1924cdb7ef1ee
parentdbc817ba4ab5cf5107853b7fa89516a2de28f3f6
reassign disk: fix permission checks

with `storage` being optional (and not allowed for reassign operations),
the ACL path in the schema can end up as `/storage/-`, which is wrong.
replace it with an explicit check:

- target `storage` for move disk
- storage from source disk for reassign disk (we only rename here, but
  it's still a new volume on that storage after all)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Qemu.pm