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

Author: Lars Michelsen <[email protected]>
Date:   Wed Oct 21 22:54:28 2009 +0200

A user can now only use a rotation when permitted to

---

 .../frontend/nagvis-js/classes/FrontendModMap.php  |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/share/frontend/nagvis-js/classes/FrontendModMap.php 
b/share/frontend/nagvis-js/classes/FrontendModMap.php
index 6695d5c..70f8f9f 100644
--- a/share/frontend/nagvis-js/classes/FrontendModMap.php
+++ b/share/frontend/nagvis-js/classes/FrontendModMap.php
@@ -73,10 +73,14 @@ class FrontendModMap extends FrontendModule {
                $this->VIEW->setSearch($this->search);
                
                // Maybe it is needed to handle the requested rotation
-               if($this->rotation != '') { 
-                       $ROTATION = new FrontendRotation($this->CORE, 
$this->rotation);
-                       $ROTATION->setStep('map', $this->name);
-                       
$this->VIEW->setRotation($ROTATION->getRotationProperties());
+               if($this->rotation != '') {
+                       // Only allow the rotation if the user is permitted to 
use it
+                       // FIXME: Errorhandling?
+                       if($this->AUTHORISATION->isPermitted('Rotation', 
'view', $this->rotation)) {
+                               $ROTATION = new FrontendRotation($this->CORE, 
$this->rotation);
+                               $ROTATION->setStep('map', $this->name);
+                               
$this->VIEW->setRotation($ROTATION->getRotationProperties());
+                       }
                }
                
     //FIXME: Maintenance mode not supported atm


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to