skip app in registry data if no rights could be fetched
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 19 Jun 2017 17:05:10 +0000 (19:05 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 20 Jun 2017 07:36:25 +0000 (09:36 +0200)
Change-Id: I57c5104a2869daa0e469271ccf6bb8bc3d1e7e0d
Reviewed-on: http://gerrit.tine20.com/customers/4903
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Frontend/Json.php

index 4b61bb4..f0c2a4f 100644 (file)
@@ -858,7 +858,13 @@ class Tinebase_Frontend_Json extends Tinebase_Frontend_Json_Abstract
             
             foreach ($userApplications as $application) {
                 $appRegistry = array();
-                $appRegistry['rights'] = Tinebase_Core::getUser()->getRights($application->name);
+                try {
+                    $appRegistry['rights'] = Tinebase_Core::getUser()->getRights($application->name);
+                } catch (Tinebase_Exception $te) {
+                    // no rights -> continue + skip app
+                    Tinebase_Exception::log($te);
+                    continue;
+                }
                 $appRegistry['allrights'] = Tinebase_Application::getInstance()->getAllRights($application->getId());
                 $appRegistry['config'] = isset($clientConfig[$application->name])
                     ? $clientConfig[$application->name]->toArray()