Details
-
Bug
-
Resolution: Fixed
-
Medium
-
1.7.8, 1.13.4, 2.2.3, 2.3.2
-
None
Description
The issue happens in all cases when Symfony's Security Component has not been initialised yet, for instance, when any router throws exception.
Steps to reproduce
- Create own ExceptionController
- Configure Twig to use custom ExceptionController
config.yml
twig: exception_controller: App\Controller\ExceptionController::showException
- In the custom controller try to render template. In template try to do:
{{ render(controller('ez_content:viewLocation', { 'locationId': locationId, 'viewType': 'embed' })) }}
where locationId is some existing location.
- You should see 500 error and exception like Token not found in token storage....
Solution
As discussed with bertrand.dunogier@ez.no and andre.romcke@ez.no, ContentViewBuilder should use our PermissionResolver instead of Symfony's AuthorizationChecker.