summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-14 14:44:31 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-14 14:44:31 +0000
commit12954b5a24cefef20fbd774b49b47533ff9c1c38 (patch)
tree2757944ae0853425ca3ef7ee118a4eb5119819df /frontends/php/include
parent7928378e93404fcd315522128f47c54660a74c39 (diff)
downloadzabbix-12954b5a24cefef20fbd774b49b47533ff9c1c38.tar.gz
zabbix-12954b5a24cefef20fbd774b49b47533ff9c1c38.tar.xz
zabbix-12954b5a24cefef20fbd774b49b47533ff9c1c38.zip
- [ZBX-114] fixed permissions for history of events (Alexei)
[svn merge -r5031:5037 svn://svn.zabbix.com/branches/1.4] git-svn-id: svn://svn.zabbix.com/trunk@5038 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/events.inc.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/frontends/php/include/events.inc.php b/frontends/php/include/events.inc.php
index 5599b29b..c3683445 100644
--- a/frontends/php/include/events.inc.php
+++ b/frontends/php/include/events.inc.php
@@ -36,6 +36,9 @@
$show_unknown = get_profile('web.events.show_unknown',0);
$sql_from = $sql_cond = "";
+
+ $availiable_groups= get_accessible_groups_by_user($USER_DETAILS,PERM_READ_LIST, null, null, get_current_nodeid());
+ $availiable_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_LIST, null, null, get_current_nodeid());
if($hostid > 0)
{
@@ -46,9 +49,14 @@
$sql_from = ", hosts_groups hg ";
$sql_cond = " and h.hostid=hg.hostid and hg.groupid=".$groupid;
}
+ else
+ {
+ $sql_from = ", hosts_groups hg ";
+ $sql_cond = " and h.hostid in (".$availiable_hosts.") ";
+ }
if($show_unknown == 0){
- $sql_cond.= ' AND e.value<>2 ';
+ $sql_cond.= ' AND e.value<>'.TRIGGER_VALUE_UNKNOWN.' ';
}