[PR #9223/6f87bf2b backport][stable-10] Fix incorrect key lookup (#9232)

Fix incorrect key lookup (#9223)

* Fix incorrect key lookup

* Create changelog fragment

(cherry picked from commit 6f87bf2bad)

Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-09 19:38:40 +01:00 committed by GitHub
parent b3f669a574
commit 859039c47a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- proxmox_backup - fix incorrect key lookup in vmid permission check (https://github.com/ansible-collections/community.general/pull/9223).

View file

@ -325,7 +325,7 @@ class ProxmoxBackupAnsible(ProxmoxAnsible):
if "/" in permissions.keys() and permissions["/"].get(
"VM.Backup", 0) == 1:
sufficient_permissions = True
elif "/vms" in permissions.keys() and permissions["/"].get(
elif "/vms" in permissions.keys() and permissions["/vms"].get(
"VM.Backup", 0) == 1:
sufficient_permissions = True
elif pool and "/pool/" + pool in permissions.keys() and permissions["/pool/" + pool].get(