implemented delete container
authorLars Kneschke <l.kneschke@metaways.de>
Thu, 15 May 2014 08:14:47 +0000 (10:14 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 4 Sep 2014 09:26:36 +0000 (11:26 +0200)
Change-Id: Ie82887fb580cbc993c48c3373bce87584a242974

Reviewed-on: http://gerrit.tine20.com/customers/642
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
tine20/Tinebase/WebDav/Container/Abstract.php

index 1627594..03fd904 100644 (file)
@@ -70,6 +70,19 @@ abstract class Tinebase_WebDav_Container_Abstract extends \Sabre\DAV\Collection
     
     /**
      * (non-PHPdoc)
+     * @see \Sabre\DAV\Node::delete()
+     */
+    public function delete()
+    {
+        try {
+            Tinebase_Container::getInstance()->deleteContainer($this->_container);
+        } catch (Tinebase_Exception_AccessDenied $tead) {
+            throw new Exception\Forbidden('Permission denied to delete node');
+        }
+    }
+    
+    /**
+     * (non-PHPdoc)
      * @see Sabre\DAV\Collection::getChild()
      */
     public function getChild($_name)