0013240: skip path generation for lists without access
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 20 Jun 2017 06:52:40 +0000 (08:52 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 20 Jun 2017 13:14:07 +0000 (15:14 +0200)
https://forge.tine20.org/view.php?id=13240

Change-Id: Id4fd889b646cc8968dce22a62f3ad132581ea7b6
Reviewed-on: http://gerrit.tine20.com/customers/4904
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Addressbook/Controller/Contact.php

index 40c2397..7cd1cab 100644 (file)
@@ -594,7 +594,12 @@ class Addressbook_Controller_Contact extends Tinebase_Controller_Record_Abstract
         // fetch all groups and role memberships and add to path
         $listIds = Addressbook_Controller_List::getInstance()->getMemberships($record);
         foreach ($listIds as $listId) {
-            $list = Addressbook_Controller_List::getInstance()->get($listId);
+            try {
+                $list = Addressbook_Controller_List::getInstance()->get($listId);
+            } catch (Tinebase_Exception_AccessDenied $tead) {
+                Tinebase_Exception::log($tead);
+                continue;
+            }
             $listPaths = $this->_getPathsOfRecord($list);
             if (count($listPaths) === 0) {
                 // add self