Module: nagvis
Branch: master
Commit: 054eb8d2a728b6d1e80095b3bfc676aa04f366e1
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=054eb8d2a728b6d1e80095b3bfc676aa04f366e1

Author: Lars Michelsen <[email protected]>
Date:   Sat Oct  2 17:11:27 2010 +0200

The overview page works now again as non administrator

---

 .../frontend/nagvis-js/classes/FrontendModInfo.php |    2 +-
 .../nagvis-js/classes/FrontendModOverview.php      |    3 ++-
 share/frontend/nagvis-js/index.php                 |    3 +--
 share/server/core/classes/CoreModOverview.php      |    1 +
 share/server/core/classes/CoreModule.php           |    5 +++--
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/share/frontend/nagvis-js/classes/FrontendModInfo.php 
b/share/frontend/nagvis-js/classes/FrontendModInfo.php
index 577584a..bf5abe7 100644
--- a/share/frontend/nagvis-js/classes/FrontendModInfo.php
+++ b/share/frontend/nagvis-js/classes/FrontendModInfo.php
@@ -31,7 +31,7 @@ class FrontendModInfo extends FrontendModule {
                $this->sName = 'Info';
                $this->CORE = $CORE;
                
-               $this->aActions = Array('view' => 0);
+               $this->aActions = Array('view' => !REQUIRES_AUTHORISATION);
                
                $this->FHANDLER = new FrontendRequestHandler($_POST);
        }
diff --git a/share/frontend/nagvis-js/classes/FrontendModOverview.php 
b/share/frontend/nagvis-js/classes/FrontendModOverview.php
index 9b7c505..78016c3 100644
--- a/share/frontend/nagvis-js/classes/FrontendModOverview.php
+++ b/share/frontend/nagvis-js/classes/FrontendModOverview.php
@@ -67,7 +67,8 @@ class FrontendModOverview extends FrontendModule {
                // Need to parse the header menu?
                if($this->CORE->getMainCfg()->getValue('index','headermenu')) {
                        // Parse the header menu
-                       $HEADER = new NagVisHeaderMenu($this->CORE, 
$this->AUTHORISATION, $this->UHANDLER, 
$this->CORE->getMainCfg()->getValue('index', 'headertemplate'));
+                       $HEADER = new NagVisHeaderMenu($this->CORE, 
$this->AUTHORISATION, $this->UHANDLER,
+                                                      
$this->CORE->getMainCfg()->getValue('index', 'headertemplate'));
                        
                        // Put rotation information to header menu
                        if($this->rotation != '') {
diff --git a/share/frontend/nagvis-js/index.php 
b/share/frontend/nagvis-js/index.php
index 017214e..bbea357 100644
--- a/share/frontend/nagvis-js/index.php
+++ b/share/frontend/nagvis-js/index.php
@@ -100,10 +100,9 @@ try {
 
        // Load the module
        $MODULE = $MHANDLER->loadModule($UHANDLER->get('mod'));
-       if($MODULE == null) {
+       if($MODULE == null)
                new GlobalMessage('ERROR', $CORE->getLang()->getText('The 
module [MOD] is not known',
                                                         Array('MOD' => 
htmlentities($UHANDLER->get('mod')))));
-       }
        $MODULE->passAuth($AUTH, $AUTHORISATION);
        $MODULE->setAction($UHANDLER->get('act'));
        $MODULE->initObject();
diff --git a/share/server/core/classes/CoreModOverview.php 
b/share/server/core/classes/CoreModOverview.php
index 7a908a6..4ca7dd2 100644
--- a/share/server/core/classes/CoreModOverview.php
+++ b/share/server/core/classes/CoreModOverview.php
@@ -30,6 +30,7 @@ class CoreModOverview extends CoreModule {
        private $OVERVIEW = null;
        
        public function __construct(GlobalCore $CORE) {
+               $this->sName = 'Overview';
                $this->CORE = $CORE;
                
                $this->aActions = Array(
diff --git a/share/server/core/classes/CoreModule.php 
b/share/server/core/classes/CoreModule.php
index cf46db2..313a330 100644
--- a/share/server/core/classes/CoreModule.php
+++ b/share/server/core/classes/CoreModule.php
@@ -122,8 +122,9 @@ abstract class CoreModule {
                        $authorized = false;
 
                if(!$authorized)
-                       new GlobalMessage('ERROR', 
$this->CORE->getLang()->getText('You are not permitted to access this page'),
-                                                                          
null, $CORE->getLang()->getText('Access denied'));
+                       new GlobalMessage('ERROR', 
$this->CORE->getLang()->getText('You are not permitted to access this page 
([PAGE]).',
+                                                                               
   Array('PAGE' => $this->sName.'/'.$action.'/'.$this->sObject)),
+                                                                               
   null, $this->CORE->getLang()->getText('Access denied'));
        }
        
        /**


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to