add optional impersonate feature (if firewall option switch_user is true)

This commit is contained in:
2019-05-16 14:04:41 +02:00
parent c1b8de4ee5
commit 7bcb80be54
4 changed files with 44 additions and 10 deletions

View File

@@ -27,6 +27,14 @@
<li>
<a href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}">{{ 'Edit password'|trans }}</a>
</li>
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
<li>
<a href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}">
{{ 'Impersonate'|trans }}
</a>
</li>
{% endif %}
</ul>
</td>
</tr>
@@ -34,11 +42,12 @@
</tbody>
</table>
<ul>
<ul>
<li>
<a href="{{ path('admin_user_new') }}">
{{ 'Add a new user'|trans|capitalize }}
</a>
</li>
</ul>
{% endblock admin_content %}