diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-09-14 11:06:27 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-09-14 11:06:27 +0000 |
| commit | 8755f9643aba3cffc5320321618fbe8e7b78b73b (patch) | |
| tree | 61f79790fee2222b1d3c5c3cd3faf09c9de8f168 /frontends/php/include/perm.inc.php | |
| parent | 220a18752f8fefdd0af90ccd17cc045c2e6ae1a6 (diff) | |
| download | zabbix-8755f9643aba3cffc5320321618fbe8e7b78b73b.tar.gz zabbix-8755f9643aba3cffc5320321618fbe8e7b78b73b.tar.xz zabbix-8755f9643aba3cffc5320321618fbe8e7b78b73b.zip | |
Initial integration of distributed monitoring.
Changes 3196:HEAD of branches/distributed
git-svn-id: svn://svn.zabbix.com/trunk@3306 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/perm.inc.php')
| -rw-r--r-- | frontends/php/include/perm.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php index 38106733..0d09f82a 100644 --- a/frontends/php/include/perm.inc.php +++ b/frontends/php/include/perm.inc.php @@ -32,6 +32,7 @@ define("GROUP_RIGHT", 0); global $USER_RIGHTS; global $_COOKIE; global $_REQUEST; + global $ZBX_CURNODEID; $USER_DETAILS = NULL; $USER_RIGHTS = array(); @@ -41,7 +42,8 @@ define("GROUP_RIGHT", 0); $sessionid = $_COOKIE["sessionid"]; $USER_DETAILS = DBfetch(DBselect("select u.*,s.* from sessions s,users u". " where s.sessionid=".zbx_dbstr($sessionid)." and s.userid=u.userid". - " and ((s.lastaccess+u.autologout>".time().") or (u.autologout=0))")); + " and ((s.lastaccess+u.autologout>".time().") or (u.autologout=0))". + " and mod(u.userid,100) = ".$ZBX_CURNODEID)); if(!$USER_DETAILS) { @@ -57,7 +59,7 @@ define("GROUP_RIGHT", 0); exit; } } else { - $USER_DETAILS = DBfetch(DBselect("select u.* from users u where u.alias='guest'")); + $USER_DETAILS = DBfetch(DBselect("select u.* from users u where u.alias='guest' and mod(u.userid,100)=$ZBX_CURNODEID")); } if($USER_DETAILS) |
