From bb0920efa60f46fe47269d0293c070f6ad477e1d Mon Sep 17 00:00:00 2001
From: Pulse Monitor
Date: Fri, 8 Aug 2025 21:50:05 +0000
Subject: [PATCH] feat: add optional backup management permissions checkbox
- Add checkbox to control whether backup write permissions are granted
- When checked: adds PVEDatastoreAdmin role on /storage (allows backup management)
- When unchecked: only PVEAuditor role (read-only, no PVE backups in Storage tab)
- Update setup script generation to conditionally add storage permissions
- Update UI to clearly explain the implications of each choice
---
.../src/components/Settings/NodeModal.tsx | 32 +++++++++++++++++--
internal/api/config_handlers.go | 12 +++++--
2 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/frontend-modern/src/components/Settings/NodeModal.tsx b/frontend-modern/src/components/Settings/NodeModal.tsx
index 09e3cb8c5..089ac6e9b 100644
--- a/frontend-modern/src/components/Settings/NodeModal.tsx
+++ b/frontend-modern/src/components/Settings/NodeModal.tsx
@@ -35,6 +35,7 @@ export const NodeModal: Component = (props) => {
monitorContainers: true,
monitorStorage: true,
monitorBackups: true,
+ enableBackupManagement: true, // New field for backup write permissions
// PBS specific
monitorDatastores: true,
monitorSyncJobs: true,
@@ -62,6 +63,7 @@ export const NodeModal: Component = (props) => {
monitorContainers: (node.type === 'pve' && 'monitorContainers' in node ? node.monitorContainers : true) ?? true,
monitorStorage: (node.type === 'pve' && 'monitorStorage' in node ? node.monitorStorage : true) ?? true,
monitorBackups: (node.type === 'pve' && 'monitorBackups' in node ? node.monitorBackups : true) ?? true,
+ enableBackupManagement: true, // Default to true for existing nodes
monitorDatastores: (node.type === 'pbs' && 'monitorDatastores' in node ? node.monitorDatastores : true) ?? true,
monitorSyncJobs: (node.type === 'pbs' && 'monitorSyncJobs' in node ? node.monitorSyncJobs : true) ?? true,
monitorVerifyJobs: (node.type === 'pbs' && 'monitorVerifyJobs' in node ? node.monitorVerifyJobs : true) ?? true,
@@ -85,6 +87,7 @@ export const NodeModal: Component = (props) => {
monitorContainers: true,
monitorStorage: true,
monitorBackups: true,
+ enableBackupManagement: true,
monitorDatastores: true,
monitorSyncJobs: true,
monitorVerifyJobs: true,
@@ -407,6 +410,26 @@ export const NodeModal: Component = (props) => {
{/* Quick Setup Tab */}
+ {/* Backup Management Checkbox */}
+
+
+
+ {formData().enableBackupManagement
+ ? 'Allows Pulse to manage PVE backups (create, delete, etc.) and display them in the Storage tab'
+ : 'Pulse will have read-only access. PVE backups will not appear in the Storage tab'}
+
+
+
Run this single command on your Proxmox VE server: