]> git.proxmox.com Git - pve-access-control.git/commit
api: roles: forbid creatin new roles starting with "PVE" namespace
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Jun 2023 07:31:19 +0000 (09:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Jun 2023 07:31:24 +0000 (09:31 +0200)
commit00b90e7185efe489ddf7cb6f5b6ebdf023cc602c
tree45a11c492e2dd3c07fe1a43bdfa64df23c701d5b
parentd6fb84bfef7653717d36e73f9a07f529b64a9e39
api: roles: forbid creatin new roles starting with "PVE" namespace

makes our reasoning when adding new top-level privileges way easier
in the future.
We already had two major upgrades with role additions where we had to
add special checks in the upgrade script and breaking changes, so
let's reserve any role starting with PVE (case-insensitive to avoid
confusion potential) and forbid creating those via API.

We might also think about letting the config parser choke on that, as
otherwise one could still create them via editing the config
manually.

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