Module: nagvis Branch: master Commit: 9f38a8ea740f1ebc66b07c006bcdd1fe3a203163 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=9f38a8ea740f1ebc66b07c006bcdd1fe3a203163
Author: Lars Michelsen <[email protected]> Date: Fri May 7 21:32:42 2010 +0200 Skipping unpermitted maps and automaps --- share/server/core/classes/CoreModGeneral.php | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/share/server/core/classes/CoreModGeneral.php b/share/server/core/classes/CoreModGeneral.php index 715eb17..2c7c035 100644 --- a/share/server/core/classes/CoreModGeneral.php +++ b/share/server/core/classes/CoreModGeneral.php @@ -178,6 +178,10 @@ class CoreModGeneral extends CoreModule { $OBJ = new NagVisServicegroup($this->CORE, $BACKEND, $objConf['backend_id'], $arrName1[$i]); break; case 'map': + // Skip unpermitted maps + if($this->CORE->getAuthorization() === null || !$this->CORE->getAuthorization()->isPermitted('Map', 'view', $arrName1[$i])) + continue 2; + // Initialize map configuration based on map type $MAPCFG = new NagVisMapCfg($this->CORE, $arrName1[$i]); $MAPCFG->readMapConfig(); @@ -186,6 +190,10 @@ class CoreModGeneral extends CoreModule { $OBJ->fetchMapObjects(); break; case 'automap': + // Skip unpermitted maps + if($this->CORE->getAuthorization() === null || !$this->CORE->getAuthorization()->isPermitted('AutoMap', 'view', $arrName1[$i])) + continue 2; + // Initialize map configuration based on map type $MAPCFG = new NagVisAutomapCfg($this->CORE, $arrName1[$i]); $MAPCFG->readMapConfig(); ------------------------------------------------------------------------------ _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
