Skip to content

Commit

Permalink
Fixes permissions repairs
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiteixeira committed Nov 12, 2023
1 parent 9673ac4 commit 2ce2afb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/proxmoxve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']]",
},
)

Expand Down Expand Up @@ -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']]",
},
)

Expand Down Expand Up @@ -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']]",
},
)

Expand Down Expand Up @@ -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]"
},
)

Expand Down

0 comments on commit 2ce2afb

Please sign in to comment.