sonata-project/SonataUserBundle — Issue #41: Exception when clicking "list users" on dashboard
Author: toretto460
Created: 2012-01-26 09:30:55+00:00
State: open

Clicking on Sonata list user action in the dashboard i get the following exception:

An exception has been thrown during the rendering of a template
("Route "sonata_user_impersonating" does not exist.") in SonataUserBundle:Admin:Field/impersonating.html.twig at line 15.

if i comment this instructions in **vendor/bundles/Sonata/UserBundle/Admin/Entity/UserAdmin.php**:

if ($this->isGranted('ROLE_ALLOWED_TO_SWITCH')) {
$listMapper
->add('impersonating', 'string', array('template' => 'SonataUserBundle:Admin:Field/impersonating.html.twig'))
;
}

Everything works as expected; by the way, my admin user does not belong to **ROLE_ALLOWED_TO_SWITCH**