summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/triggers.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-18 15:16:33 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-18 15:16:33 +0000
commitbe6ea34f2de74134500313ecf31fef237e077864 (patch)
treee58db26269f5dd7ecb3932fb572f96e33651dc1f /frontends/php/include/triggers.inc.php
parent8f5b6dc7db062516691836e4ff9df984f6e2de67 (diff)
- fix permission check for overviews (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2742 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/triggers.inc.php')
-rw-r--r--frontends/php/include/triggers.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php
index 2f8feb3d..393fc77e 100644
--- a/frontends/php/include/triggers.inc.php
+++ b/frontends/php/include/triggers.inc.php
@@ -972,18 +972,20 @@
" group by h.host,h.hostid order by h.host");
while($row=DBfetch($result))
{
+ if(!check_right("Host","R",$row["hostid"])) continue; //TODO optimize duplication check !!!! see top
$header=array_merge($header,array(new CImg("vtext.php?text=".$row["host"])));
$hosts=array_merge($hosts,array($row["hostid"]));
}
$table->SetHeader($header,"vertical_header");
- $db_triggers = DBselect("select distinct t.description from hosts h,items i,triggers t,functions f $group_where".
+ $db_triggers = DBselect("select distinct t.description,h.hostid from hosts h,items i,triggers t,functions f $group_where".
" h.status=".HOST_STATUS_MONITORED." and h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=t.triggerid".
" and t.status=".TRIGGER_STATUS_ENABLED.
" group by 1");
while($triggers = DBfetch($db_triggers))
{
+ if(!check_right("Host","R",$row["hostid"])) continue; //TODO optimize duplication check !!!! see top
$table_row = array(nbsp($triggers["description"]));
foreach($hosts as $hostid)
{