mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
25 lines
401 B
Markdown
25 lines
401 B
Markdown
|
---
|
||
|
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 %}
|
||
|
|
||
|
```
|