src/api2/node/status.rs: add access permissions
This commit is contained in:
parent
9989d2c4e9
commit
b5037fa8ed
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user