acl node reset not working
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 10 Jul 2017 14:48:39 +0000 (16:48 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 10 Jul 2017 15:44:55 +0000 (17:44 +0200)
- client now sends empty string instead of 'null'

Change-Id: I3c60c1c55236f936be77f2052878fe1958b09e09
Reviewed-on: http://gerrit.tine20.com/customers/5082
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Filemanager/Frontend/JsonTests.php
tine20/Filemanager/Controller/Node.php

index 04e889f..d470632 100644 (file)
@@ -1801,7 +1801,7 @@ class Filemanager_Frontend_JsonTests extends TestCase
         self::assertEquals(1, count($child['grants']), 'node should have only personal grants - '
             . print_r($child['grants'], true));
 
-        $child['acl_node'] = null;
+        $child['acl_node'] = '';
         $childWithoutPersonalGrants = $this->_getUit()->saveNode($child);
 
         self::assertEquals(2, count($childWithoutPersonalGrants['grants']), 'node should have parent grants again - '
index 7d5472c..df6b23c 100644 (file)
@@ -188,8 +188,8 @@ class Filemanager_Controller_Node extends Tinebase_Controller_Record_Abstract
             $nodePath = Tinebase_Model_Tree_Node_Path::createFromStatPath($this->_backend->getPathOfNode($_record->getId(), true));
             if (! $nodePath->isSystemPath()) {
 
-                if ($_record->acl_node === null && ! $nodePath->isToplevelPath()) {
-                    // acl_node === null -> remove acl
+                if (empty($_record->acl_node) && ! $nodePath->isToplevelPath()) {
+                    // acl_node empty -> remove acl
                     $node = $this->_backend->setAclFromParent($nodePath->statpath);
                     $aclNode = $node->acl_node;