Closed mebrett closed 8 years ago
When a user who is not logged in to the admin side is trying to access a collecting form, they get the following error:
exception 'Omeka\Api\Exception\PermissionDeniedException' with message 'Permission denied for the current user to read the Collecting\Entity\CollectingForm resource.' in /websites/omekadev/home/www/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php:454 Stack trace: #0 /websites/omekadev/home/www/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(317): Omeka\Api\Adapter\AbstractEntityAdapter->authorize(Object(Collecting\Entity\CollectingForm), 'read') #1 /websites/omekadev/home/www/omeka-s/application/src/Api/Manager.php(218): Omeka\Api\Adapter\AbstractEntityAdapter->read(Object(Omeka\Api\Request)) #2 /websites/omekadev/home/www/omeka-s/application/src/Api/Manager.php(108): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #3 /websites/omekadev/home/www/omeka-s/application/src/View/Helper/Api.php(69): Omeka\Api\Manager->read('collecting_form...', '1', Array) #4 /websites/omekadev/home/www/omeka-s/modules/Collecting/src/Site/BlockLayout/Collecting.php(52): Omeka\View\Helper\Api->read('collecting_form...', '1') #5 /websites/omekadev/home/www/omeka-s/application/src/View/Helper/BlockLayout.php(122): Collecting\Site\BlockLayout\Collecting->render(Object(Zend\View\Renderer\PhpRenderer), Object(Omeka\Api\Representation\SitePageBlockRepresentation)) #6 /websites/omekadev/home/www/omeka-s/application/view-shared/omeka/site/page/content.phtml(9): Omeka\View\Helper\BlockLayout->render(Object(Omeka\Api\Representation\SitePageBlockRepresentation)) #7 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(502): include('/websites/omeka...') #8 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel)) #9 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel)) #10 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel)) #11 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel)) #12 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel)) #13 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object(Zend\View\Model\ViewModel)) #14 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(271): Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent)) #15 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(143): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent)) #16 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Application.php(367): Zend\EventManager\EventManager->triggerEvent(Object(Zend\Mvc\MvcEvent)) #17 /websites/omekadev/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Application.php(348): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent)) #18 /websites/omekadev/home/www/omeka-s/index.php(17): Zend\Mvc\Application->run() #19 {main}
This should work now.
Fixed.
When a user who is not logged in to the admin side is trying to access a collecting form, they get the following error: