fix(agent): grant PVEDatastoreAdmin for backup visibility

The unified agent's Proxmox setup was missing the PVEDatastoreAdmin
permission on /storage, causing local PVE backups to not appear in
Pulse's backup overview for users who set up nodes via the agent.

The UI-generated setup script already included this permission, but
the agent path (--enable-proxmox) did not, creating an inconsistency.

Related to #1139
This commit is contained in:
rcourtman
2026-02-03 19:11:25 +00:00
parent 43c696896f
commit 316a56299c

View File

@@ -259,6 +259,9 @@ func (p *ProxmoxSetup) setupPVEToken(ctx context.Context, tokenName string) (str
_, _ = p.collector.CommandCombinedOutput(ctx, "pveum", "role", "add", "PulseMonitor", "-privs", "Sys.Audit,VM.Monitor,Datastore.Audit")
_, _ = p.collector.CommandCombinedOutput(ctx, "pveum", "aclmod", "/", "-user", proxmoxUserPVE, "-role", "PulseMonitor")
// Add PVEDatastoreAdmin on /storage for backup visibility (issue #1139)
_, _ = p.collector.CommandCombinedOutput(ctx, "pveum", "aclmod", "/storage", "-user", proxmoxUserPVE, "-role", "PVEDatastoreAdmin")
// Create token with privilege separation disabled
output, err := p.collector.CommandCombinedOutput(ctx, "pveum", "user", "token", "add", proxmoxUserPVE, tokenName, "--privsep", "0")
if err != nil {