From 626431f27c6c4c251538909a275ca3ab48701660 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 14 Jan 2022 09:49:26 +0100 Subject: [PATCH] Added check on agents without acl --- .../include/class/TreeService.class.php | 1 + .../include/javascript/tree/TreeController.js | 36 ++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php index 9d9018665c..ebca4562a6 100644 --- a/pandora_console/include/class/TreeService.class.php +++ b/pandora_console/include/class/TreeService.class.php @@ -430,6 +430,7 @@ class TreeService extends Tree $tmp['searchChildren'] = 1; } else { $tmp['searchChildren'] = 0; + $tmp['noAcl'] = 1; } $tmp['showEventsBtn'] = 1; diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index afa55434c0..86cddc0814 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -1183,24 +1183,26 @@ var TreeController = { disabled == false ) { if (element.type == "agent" || element.type == "module") { - $content - .click(function(e) { - _getTreeDetailData( - element.type, - element.id, - element.serverID, - function(error, data) { - if (error) { - // console.error(error); - } else { - controller.detailRecipient - .render(element.name, data) - .open(); + if (typeof element.noAcl === "undefined") { + $content + .click(function(e) { + _getTreeDetailData( + element.type, + element.id, + element.serverID, + function(error, data) { + if (error) { + // console.error(error); + } else { + controller.detailRecipient + .render(element.name, data) + .open(); + } } - } - ); - }) - .css("cursor", "pointer"); + ); + }) + .css("cursor", "pointer"); + } } }