]> git.proxmox.com Git - proxmox-backup.git/commitdiff
fix #2957: allow Sys.Audit access to node RRD
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 16 Sep 2020 09:51:12 +0000 (11:51 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Sep 2020 04:03:25 +0000 (06:03 +0200)
this is the same privilege needed to query the node status.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/api2/node/rrd.rs

index 9988146143ac20a8baf37e4b0a1f6649fb8d769f..cc18f30e4b011403979958965470ed0560e4ecc7 100644 (file)
@@ -1,9 +1,10 @@
 use anyhow::Error;
 use serde_json::{Value, json};
 
-use proxmox::api::{api, Router};
+use proxmox::api::{api, Permission, Router};
 
 use crate::api2::types::*;
+use crate::config::acl::PRIV_SYS_AUDIT;
 use crate::rrd::{extract_cached_data, RRD_DATA_ENTRIES};
 
 pub fn create_value_from_rrd(
@@ -56,6 +57,9 @@ pub fn create_value_from_rrd(
             },
         },
     },
+    access: {
+        permission: &Permission::Privilege(&["system", "status"], PRIV_SYS_AUDIT, false),
+    },
 )]
 /// Read node stats
 fn get_node_stats(