[pbs-devel] [PATCH backup] api: datastore: require allocate privilege for deletion

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Oct 8 09:16:02 CEST 2020


makes only sense if we allow addition of a datastore also just with
that privilege

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

based on the previous series which added this priv. to the create api path

 src/api2/config/datastore.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
index 140af833..5ab637ce 100644
--- a/src/api2/config/datastore.rs
+++ b/src/api2/config/datastore.rs
@@ -375,7 +375,7 @@ pub fn update_datastore(
         },
     },
     access: {
-        permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_MODIFY, false),
+        permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_ALLOCATE, false),
     },
 )]
 /// Remove a datastore configuration.
-- 
2.27.0






More information about the pbs-devel mailing list