diff --git a/app/src/Controller/AppController.php b/app/src/Controller/AppController.php index 07c27cd42..393a0ab9f 100644 --- a/app/src/Controller/AppController.php +++ b/app/src/Controller/AppController.php @@ -173,7 +173,7 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $this->set('vv_controller', $this->request->getParam('controller')); $this->set('vv_action', $this->request->getParam('action')); - if(isset($this->RegistryAuth)) { + if(isset($this->RegistryAuth) && !$this->request->is('restful')) { // Components might not be loaded on error, so check $this->set('vv_menu_permissions', $this->RegistryAuth->getMenuPermissions($this->getCOID()));