summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-12 14:49:58 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-12 14:49:58 +0000
commit21ec4e8c5a6add1fa22ca6f2eb4330ea2411dc0f (patch)
treef3a62639ecbb0f2533e6123dac0d3c50e701b28a
parent44c297403e8be585e6dd89ccfee7990dad1feadf (diff)
downloadzabbix-21ec4e8c5a6add1fa22ca6f2eb4330ea2411dc0f.tar.gz
zabbix-21ec4e8c5a6add1fa22ca6f2eb4330ea2411dc0f.tar.xz
zabbix-21ec4e8c5a6add1fa22ca6f2eb4330ea2411dc0f.zip
- fixed permissions for hosts
git-svn-id: svn://svn.zabbix.com/trunk@3822 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--frontends/php/hosts.php3
-rw-r--r--frontends/php/include/perm.inc.php2
-rw-r--r--frontends/php/users.php6
3 files changed, 1 insertions, 10 deletions
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php
index a65cf8a1..2418fa69 100644
--- a/frontends/php/hosts.php
+++ b/frontends/php/hosts.php
@@ -35,12 +35,10 @@ include_once "include/page_header.php";
$available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE,null,PERM_RES_IDS_ARRAY,$ZBX_CURNODEID);
if(isset($_REQUEST["hostid"]) && $_REQUEST["hostid"] > 0 && !in_array($_REQUEST["hostid"], $available_hosts))
{
- SDI('deni1');
access_deny();
}
if(isset($_REQUEST["apphostid"]) && $_REQUEST["apphostid"] > 0 && !in_array($_REQUEST["apphostid"], $available_hosts))
{
- SDI('deni2');
access_deny();
}
@@ -52,7 +50,6 @@ include_once "include/page_header.php";
if(!in_array($_REQUEST["groupid"], get_accessible_groups_by_user($USER_DETAILS,PERM_READ_WRITE,null,
PERM_RES_IDS_ARRAY,$ZBX_CURNODEID)))
{
- SDI('deni3');
access_deny();
}
}
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php
index 7f6d1124..653b121f 100644
--- a/frontends/php/include/perm.inc.php
+++ b/frontends/php/include/perm.inc.php
@@ -169,7 +169,7 @@ COpt::counter_up('perm');
' from hosts h left join hosts_groups hg on hg.hostid=h.hostid '.
' left join groups g on g.groupid=hg.groupid '.
' left join rights r on r.id=g.groupid and r.type='.RESOURCE_TYPE_GROUP.
- ' left join users_groups ug on ug.userid='.$userid.
+ ' left join users_groups ug on ug.usrgrpid=r.groupid and ug.userid='.$userid.
' left join nodes n on '.DBid2nodeid('h.hostid').'=n.nodeid '.
$where.' group by h.hostid,n.nodeid,n.name,h.host,ug.userid '.
' order by n.name,n.nodeid, h.host, permission desc');
diff --git a/frontends/php/users.php b/frontends/php/users.php
index 9a14b4f1..4c61e29d 100644
--- a/frontends/php/users.php
+++ b/frontends/php/users.php
@@ -115,11 +115,6 @@ include_once "include/page_header.php";
check_fields($fields);
- if(isset($_REQUEST["usrgrpid"]) and
- DBfetch(DBselect('select id from users_groups where userid='.$USER_DETAILS['userid'].' and usrgrpid='.$_REQUEST["usrgrpid"])))
- {
- access_deny();
- }
?>
<?php
if($_REQUEST["config"]==0)
@@ -451,7 +446,6 @@ include_once "include/page_header.php";
" order by alias");
while($db_user=DBfetch($db_users)) $users[$db_user['userid']] = $db_user["alias"];
- if(isset($users[$USER_DETAILS['userid']])) continue;
$table->addRow(array(
array(