From b5037fa8ed798f5222a08890b7ac58194db6018a Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 16 Apr 2020 17:05:09 +0200 Subject: [PATCH] src/api2/node/status.rs: add access permissions --- src/api2/node/status.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api2/node/status.rs b/src/api2/node/status.rs index 9bdf256c..8237ee39 100644 --- a/src/api2/node/status.rs +++ b/src/api2/node/status.rs @@ -3,10 +3,11 @@ use serde_json::{json, Value}; use proxmox::sys::linux::procfs; -use proxmox::api::{api, ApiMethod, Router, RpcEnvironment, SubdirMap}; +use proxmox::api::{api, ApiMethod, Router, RpcEnvironment, SubdirMap, Permission}; use proxmox::list_subdirs_api_method; use crate::api2::types::*; +use crate::config::acl::PRIV_SYS_AUDIT; #[api( input: { @@ -44,7 +45,10 @@ use crate::api2::types::*; optional: true, }, } - } + }, + access: { + permission: &Permission::Privilege(&[], PRIV_SYS_AUDIT, false), + }, )] /// Read node memory, CPU and (root) disk usage fn get_usage(