diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-22 08:53:23 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-22 08:53:23 +0000 |
| commit | 97583f76e5851df0c94ac1cb4d0f64ddf46a72e7 (patch) | |
| tree | 0863d76cfa80dad985b671ab54f592f9f45d3f73 /frontends/php/include/discovery.inc.php | |
| parent | 81f73b9332fae92a2da659d9a4edf31e87ccbf57 (diff) | |
| download | zabbix-97583f76e5851df0c94ac1cb4d0f64ddf46a72e7.tar.gz zabbix-97583f76e5851df0c94ac1cb4d0f64ddf46a72e7.tar.xz zabbix-97583f76e5851df0c94ac1cb4d0f64ddf46a72e7.zip | |
- added viwer of dicovery events (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3907 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/discovery.inc.php')
| -rw-r--r-- | frontends/php/include/discovery.inc.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/frontends/php/include/discovery.inc.php b/frontends/php/include/discovery.inc.php index 7506a671..a226f357 100644 --- a/frontends/php/include/discovery.inc.php +++ b/frontends/php/include/discovery.inc.php @@ -17,8 +17,26 @@ ** along with this program; if not, write to the Free Software ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ + require_once "include/perm.inc.php"; + ?> <?php + function check_right_on_discovery($permission) + { + global $USER_DETAILS; + global $ZBX_CURNODEID; + + if( $USER_DETAILS['type'] >= USER_TYPE_ZABBIX_ADMIN ) + { + $accessible_nodes = get_accessible_nodes_by_user($USER_DETAILS, $permission, null, PERM_RES_IDS_ARRAY); + + if( in_array($ZBX_CURNODEID, $accessible_nodes) ) + return true; + } + + return false; + } + function discovery_check_type2str($type_int) { $str_type[SVC_SSH] = S_SSH; |
