[pbs-devel] [PATCH proxmox-backup] fix #2978: allow non-root to view datastore usage

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Sep 3 14:49:22 CEST 2020


for datastores where the requesting user has read or write permissions,
since the API method itself filters by that already. this is the same
permission setting and filtering that the datastore list API endpoint
does.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/api2/status.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/api2/status.rs b/src/api2/status.rs
index c44e73f1..10ae8b3d 100644
--- a/src/api2/status.rs
+++ b/src/api2/status.rs
@@ -74,6 +74,9 @@ use crate::config::acl::{
             },
         },
     },
+    access: {
+        permission: &Permission::Anybody,
+    },
 )]
 /// List Datastore usages and estimates
 fn datastore_status(
-- 
2.20.1






More information about the pbs-devel mailing list