]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #4245: api: node HW: allow to get PCI info with Sys.Audit on /
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 20 Nov 2022 12:27:27 +0000 (13:27 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 20 Nov 2022 12:29:58 +0000 (13:29 +0100)
keep Sys.Modify only for backward compat, as it does not make really
much sense to ask for that on an informative GET call.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Hardware/PCI.pm

index d9c5b37e58ba0bdbf576bedf4e05db6b6ef83a3a..a3a689bf3d90a8bf912ee64f9ab2b33572bbcec1 100644 (file)
@@ -20,7 +20,7 @@ __PACKAGE__->register_method ({
     protected => 1,
     proxyto => "node",
     permissions => {
-       check => ['perm', '/', ['Sys.Modify']],
+       check => ['perm', '/', ['Sys.Audit', 'Sys.Modify'], any => 1],
     },
     parameters => {
        additionalProperties => 0,
@@ -177,7 +177,7 @@ __PACKAGE__->register_method ({
     protected => 1,
     proxyto => "node",
     permissions => {
-       check => ['perm', '/', ['Sys.Modify']],
+       check => ['perm', '/', ['Sys.Audit', 'Sys.Modify'], any => 1],
     },
     parameters => {
        additionalProperties => 0,