skips acl check if no user is available
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 25 Apr 2014 16:08:51 +0000 (18:08 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 28 Apr 2014 15:15:19 +0000 (17:15 +0200)
* this might be called during setup / update

Change-Id: I076c9e681ad1c89215e5169fe387a85383c74356
Reviewed-on: http://gerrit.tine20.com/customers/562
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Model/Filter/FilterGroup.php

index 55489d4..f8e5d5b 100644 (file)
@@ -211,7 +211,7 @@ class Tinebase_Model_Filter_FilterGroup implements Iterator
         if ($this->_configuredModel) {
             $m = $this->_configuredModel;
             $filterConfig = $m::getConfiguration()->getFilterModel();
-            
+
             if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' ' 
                 . ' Filter config: ' . print_r($filterConfig, TRUE));
             
@@ -347,7 +347,7 @@ class Tinebase_Model_Filter_FilterGroup implements Iterator
 
         $appName = str_replace('_', '', $_linkInfo['appName']);
         
-        if (! Tinebase_Application::getInstance()->isInstalled($appName) || ! Tinebase_Core::getUser()->hasRight($appName, Tinebase_Acl_Rights_Abstract::RUN)) {
+        if (! Tinebase_Application::getInstance()->isInstalled($appName) || (is_object(Tinebase_Core::getUser()) && ! Tinebase_Core::getUser()->hasRight($appName, Tinebase_Acl_Rights_Abstract::RUN))) {
             throw new Tinebase_Exception_AccessDenied('No right to access application');
         }