From 6b6f18a69566704b22d9e74532838f68b5934be6 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 21 Jul 2015 13:26:07 +0200 Subject: [PATCH] When user hace acl's and tags dont see data in tree view, its fixed. Tiquet:#2508 --- pandora_console/include/class/Tree.class.php | 56 ++++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index b4b5d89912..891bd51024 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -1746,29 +1746,41 @@ class Tree { } public function getData() { - if (! defined('METACONSOLE')) { - switch ($this->type) { - case 'os': - $this->getDataOS(); - break; - case 'group': - $this->getDataGroup(); - break; - case 'module_group': - $this->getDataModuleGroup(); - break; - case 'module': - $this->getDataModules(); - break; - case 'tag': - $this->getDataTag(); - break; - case 'agent': - $this->getDataAgent(); - break; - default: - $this->getDataExtended(); + if ($this->strictACL) { + switch ($this->type) { + case 'group': + case 'tag': + $this->getDataStrict(); + break; + case 'agent': + $this->getDataAgent(); + break; + } + } + else{ + switch ($this->type) { + case 'os': + $this->getDataOS(); + break; + case 'group': + $this->getDataGroup(); + break; + case 'module_group': + $this->getDataModuleGroup(); + break; + case 'module': + $this->getDataModules(); + break; + case 'tag': + $this->getDataTag(); + break; + case 'agent': + $this->getDataAgent(); + break; + default: + $this->getDataExtended(); + } } } else if ($this->strictACL) {