mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-18 11:29:44 +00:00
fix: api: permission using wrong pathname
The read_interface endpoint uses the wrong path identifier. It has been renamed to 'iface' some time ago but hasn't been changed here. When a user has a permission on '/' with 'Admin', he wasn't able to show the config of a single interface, as the non-existent path didn't match. Reported-by: https://forum.proxmox.com/threads/permissons-not-working-for-network-settings.147899/ Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
parent
83e748baf5
commit
92c0b1866b
@ -149,7 +149,7 @@ pub fn list_network_devices(
|
|||||||
},
|
},
|
||||||
returns: { type: Interface },
|
returns: { type: Interface },
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["system", "network", "interfaces", "{name}"], PRIV_SYS_AUDIT, false),
|
permission: &Permission::Privilege(&["system", "network", "interfaces", "{iface}"], PRIV_SYS_AUDIT, false),
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Read a network interface configuration.
|
/// Read a network interface configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user