From 2ce2afbdf4aeb50b38a52b98a2fd3a0cb520ec33 Mon Sep 17 00:00:00 2001 From: dougiteixeira <31328123+dougiteixeira@users.noreply.github.com> Date: Sun, 12 Nov 2023 16:53:15 -0300 Subject: [PATCH] Fixes permissions repairs --- custom_components/proxmoxve/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_components/proxmoxve/__init__.py b/custom_components/proxmoxve/__init__.py index 519144b..96fef8f 100644 --- a/custom_components/proxmoxve/__init__.py +++ b/custom_components/proxmoxve/__init__.py @@ -383,6 +383,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b "port": config_entry.data[CONF_PORT], "resource_type": ProxmoxType.Node.capitalize(), "resource": node, + "permission": f"['perm','/nodes/{node}',['Sys.Audit']]", }, ) @@ -419,6 +420,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b "port": config_entry.data[CONF_PORT], "resource_type": ProxmoxType.QEMU.upper(), "resource": vm_id, + "permission": f"['perm','/vms/{vm_id}',['VM.Audit']]", }, ) @@ -455,6 +457,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b "port": config_entry.data[CONF_PORT], "resource_type": ProxmoxType.LXC.upper(), "resource": container_id, + "permission": f"['perm','/vms/{container_id}',['VM.Audit']]", }, ) @@ -491,6 +494,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b "port": config_entry.data[CONF_PORT], "resource_type": ProxmoxType.Storage.capitalize(), "resource": storage_id, + "permission": f"['perm','/storage/{storage_id}',['Datastore.Audit'],'any',1]" }, )