[pve-devel] [PATCH cluster] api: allow cluster wide sys auditors to get join info

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Apr 30 14:40:48 CEST 2018


add same permissions as the GET cluster config call has.

Else the WebUI shows 'Standalone Node' for clustered nodes if the
user is not root but has audit rights.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/PVE/API2/ClusterConfig.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/data/PVE/API2/ClusterConfig.pm b/data/PVE/API2/ClusterConfig.pm
index ad7e8c6..0534e6a 100644
--- a/data/PVE/API2/ClusterConfig.pm
+++ b/data/PVE/API2/ClusterConfig.pm
@@ -399,6 +399,9 @@ __PACKAGE__->register_method ({
 __PACKAGE__->register_method ({
     name => 'join_info',
     path => 'join',
+    permissions => {
+	check => ['perm', '/', [ 'Sys.Audit' ]],
+    },
     method => 'GET',
     description => "Get information needed to join this cluster over the connected node.",
     parameters => {
-- 
2.14.2





More information about the pve-devel mailing list