src/api2/node/journal.rs: add access permissions

This commit is contained in:
Dietmar Maurer 2020-04-16 12:44:59 +02:00
parent 4b40148caa
commit 68ed0c629d

View File

@ -4,9 +4,10 @@ use failure::*;
use serde_json::{json, Value}; use serde_json::{json, Value};
use std::io::{BufRead,BufReader}; use std::io::{BufRead,BufReader};
use proxmox::api::{api, ApiMethod, Router, RpcEnvironment}; use proxmox::api::{api, ApiMethod, Router, RpcEnvironment, Permission};
use crate::api2::types::*; use crate::api2::types::*;
use crate::config::acl::PRIV_SYS_AUDIT;
#[api( #[api(
protected: true, protected: true,
@ -53,6 +54,9 @@ use crate::api2::types::*;
description: "Line text.", description: "Line text.",
}, },
}, },
access: {
permission: &Permission::Privilege(&[], PRIV_SYS_AUDIT, false),
},
)] )]
/// Read syslog entries. /// Read syslog entries.
fn get_journal( fn get_journal(