From 449f1b5d2fe660aa717df5fd85237bb91232d12c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 6 Feb 2012 11:23:30 +0100 Subject: [PATCH] require Sys.Audit to read cluster status --- PVE/API2/Cluster.pm | 5 ++++- PVE/API2/Network.pm | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 656f5c7e..354cc1d0 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -310,6 +310,7 @@ __PACKAGE__->register_method({ }, code => sub { my ($param) = @_; + return PVE::Cluster::cfs_read_file('datacenter.cfg'); }}); @@ -440,7 +441,9 @@ __PACKAGE__->register_method({ path => 'status', method => 'GET', description => "Get cluster status informations.", - permissions => { user => 'all' }, + permissions => { + check => ['perm', '/', [ 'Sys.Audit' ]], + }, protected => 1, parameters => { additionalProperties => 0, diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm index fa3a9348..33d770e8 100644 --- a/PVE/API2/Network.pm +++ b/PVE/API2/Network.pm @@ -307,6 +307,3 @@ __PACKAGE__->register_method({ return undef; }}); - - -