]> git.proxmox.com Git - pve-manager.git/commit
api: notification: make the 'mail-to-root' target visible to any user
authorLukas Wagner <l.wagner@proxmox.com>
Thu, 3 Aug 2023 12:17:13 +0000 (14:17 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 16 Aug 2023 09:11:24 +0000 (11:11 +0200)
commit4c40d7cbed418eeb22a7df786ce9725bb5539cf5
tree18d57e0436296fe5eadaf0f424c8e0e338fd93ca
parentc81bca2d28744616098448b81fa58e133d3ac5ed
api: notification: make the 'mail-to-root' target visible to any user

Since the target does not require Mapping.Use, it should also be
visible and testable by all users.

Short explanation why the 'mail-to-root' is exempt from priv checks:

To ensure backwards compatibility, the 'mail-to-root' target does not
require the `Mapping.Use` privs. This is needed due to the fact that
this target is used as a fallback in case no other target is
configured for an event. For instance, the /node/<name>/apt/update API
call only requires Sys.Modify for the node, but it can also send a
notification. If we were to require Mapping.Use, we could break the
apt/update API compat in the case that a notification shall be sent,
but without any configured notification target (which will then
default to 'mail-to-root').

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
PVE/API2/Cluster/Notifications.pm