wiki/content/20201116122525-is_impersonator.md

26 lines
418 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-29 18:27:12 +00:00
date: 2020-11-16
2024-05-06 20:40:05 +00:00
id: a7b0f7f9-72f1-4065-8b6f-d364caa6155e
title: IS~IMPERSONATOR~
---
# Description
Replacement for
[ROLE~PREVIOUSADMIN~](20201116122125-role_previous_admin)
# Syntax
``` php
{# BEFORE #}
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<a href="...">Exit impersonation</a>
{% endif %}
{# AFTER #}
{% if is_granted('IS_IMPERSONATOR') %}
<a href="...">Exit impersonation</a>
{% endif %}
```