Преглед изворни кода

Merge pull request #36 from EmmanuelVella/patch-1

Replaced non existing homepage route with admin dashboard route
Thomas пре 13 година
родитељ
комит
d7bb8e975a

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

@@ -157,6 +157,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
 

+ 2 - 2
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('homepage', {'_switch_user': object.username}) }}">{{ "switch_user"|trans({}, 'SonataUserBundle')}}</a>
-{% endblock %}
+    <a href="{{ url('sonata_user_impersonating', {'_switch_user': object.username}) }}">{{ "switch_user"|trans({}, 'SonataUserBundle')}}</a>
+{% endblock %}