]> git.proxmox.com Git - pve-guest-common.git/commit
GuestHelpers: add tag related helpers
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 16 Nov 2022 15:48:00 +0000 (16:48 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 17 Nov 2022 09:24:33 +0000 (10:24 +0100)
commit2b00f6236d3bcaba61179e807f2b2fa0a8dfcda5
tree5f8fb52ebb9629d3d6e06b05316c4845630b7208
parentb208122a119f849c3b32dc56d2a3db390806fae7
GuestHelpers: add tag related helpers

'get_allowed_tags':
returns the allowed tags for the given user

'assert_tag_permissions'
helper to check permissions for tag setting/updating/deleting
for both container and qemu-server

gets the list of allowed tags from the DataCenterConfig and the current
user permissions, and checks for each tag that is added/removed if
the user has permissions to modify it

'normal' tags require 'VM.Config.Options' on '/vms/<vmid>', but not
allowed tags (either limited with 'user-tag-access' or
'privileged-tags' in the datacenter.cfg) requrie 'Sys.Modify' on '/'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
debian/control
src/PVE/GuestHelpers.pm