throw sabredav exception when application is unavailable
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 28 Aug 2014 10:19:58 +0000 (12:19 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 4 Sep 2014 09:26:46 +0000 (11:26 +0200)
Change-Id: I325d945b844a4e3de74da777bf39d9a67beb4b49
Reviewed-on: http://gerrit.tine20.com/customers/1057
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/WebDav/Collection/AbstractContainerTree.php

index 14d394f..09c8324 100644 (file)
@@ -304,15 +304,19 @@ abstract class Tinebase_WebDav_Collection_AbstractContainerTree extends \Sabre\D
                         }
                     }
                     
-                    $containers = Tinebase_Container::getInstance()->getPersonalContainer(
-                        Tinebase_Core::getUser(),
-                        $this->_getAppliationName(),
-                        $accountId,
-                        array(
-                            Tinebase_Model_Grants::GRANT_READ, 
-                            Tinebase_Model_Grants::GRANT_SYNC
-                        )
-                    );
+                    try {
+                        $containers = Tinebase_Container::getInstance()->getPersonalContainer(
+                            Tinebase_Core::getUser(),
+                            $this->_getAppliationName(),
+                            $accountId,
+                            array(
+                                Tinebase_Model_Grants::GRANT_READ, 
+                                Tinebase_Model_Grants::GRANT_SYNC
+                            )
+                        );
+                    } catch (Tinebase_Exception_AccessDenied $tead) {
+                        throw new Sabre\DAV\Exception\NotFound("Could not find path (" . $tead->getMessage() . ")");
+                    }
                     
                 } else {
                     throw new Sabre\DAV\Exception\NotFound("Path $this->_path not found");