From 153ec50b086a09586607580bb4ca3d3ae171ff14 Mon Sep 17 00:00:00 2001 From: vgilc Date: Tue, 27 May 2014 12:10:16 +0000 Subject: [PATCH] 2014-05-27 Vanessa Gil * operation/snmpconsole/snmp_view.php: Changed ACLs. All users can view traps whose source isn't in console. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10015 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/operation/snmpconsole/snmp_view.php | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 79892bb0a9..55670486a2 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-05-27 Vanessa Gil + + * operation/snmpconsole/snmp_view.php: Changed ACLs. All + users can view traps whose source isn't in console. + 2014-05-27 Miguel de Dios * godmode/agentes/module_manager.php, diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 276dbe7b83..e659ca3c50 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -165,12 +165,12 @@ foreach ($all_traps as $trap) { //Make query to extract traps of DB. switch ($config["dbtype"]) { case "mysql": - $sql = "SELECT * + $sql = "SELECT * FROM ttrap WHERE (`source` IN ( SELECT direccion FROM tagente WHERE id_grupo IN ($str_user_groups) - ) OR `source`='') %s + ) OR `source`='' OR `source` NOT IN (SELECT direccion FROM tagente)) %s ORDER BY timestamp DESC LIMIT %d,%d"; break; @@ -180,7 +180,7 @@ switch ($config["dbtype"]) { WHERE (source IN ( SELECT direccion FROM tagente WHERE id_grupo IN ($str_user_groups) - ) OR source='') %s + ) OR source='' OR source NOT IN (SELECT direccion FROM tagente)) %s ORDER BY timestamp DESC LIMIT %d OFFSET %d"; break; @@ -191,7 +191,7 @@ switch ($config["dbtype"]) { SELECT direccion FROM tagente WHERE id_grupo IN ($str_user_groups) ) - OR source='') %s + OR source='' OR source NOT IN (SELECT direccion FROM tagente)) %s ORDER BY timestamp DESC LIMIT %d OFFSET %d"; break;