wiki/content/20201116122125-role_previous_admin.md

23 lines
433 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:34:11 +00:00
date: 2020-11-16
2024-05-06 20:40:05 +00:00
id: bc9f093c-3ae9-44ca-bf33-b8c262bd1f55
title: ROLE~PREVIOUSADMIN~
---
# Description
Shows that currently logged in user is impersonating another user
# Syntax
``` php
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<a href="...">Exit impersonation</a>
{% endif %}
```
# Deprecation
Deprecated in [Symfony 5.1](20201116105919-symfony_5_1), replaced with
[IS~IMPERSONATOR~](20201116122525-is_impersonator).