Forráskód Böngészése

Updated user impersonating redirect route and doc

Emmanuel Vella 13 éve
szülő
commit
255034864d

+ 1 - 0
Resources/doc/reference/installation.rst

@@ -138,6 +138,7 @@ Add the related security routing information
         resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
         prefix: /admin
 
+You also need to define a ``sonata_user_impersonating`` route, used as a redirection after an user impersonating.
 
 Then add a new custom firewall handlers for the admin
 

+ 1 - 1
Resources/views/Admin/Field/impersonating.html.twig

@@ -12,5 +12,5 @@ file that was distributed with this source code.
 {% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}
 
 {% block field %}
-    <a href="{{ url('sonata_admin_dashboard', {'_switch_user': object.username}) }}">{{ "switch_user"|trans({}, 'SonataUserBundle')}}</a>
+    <a href="{{ url('sonata_user_impersonating', {'_switch_user': object.username}) }}">{{ "switch_user"|trans({}, 'SonataUserBundle')}}</a>
 {% endblock %}