[Security][Profiler] Display the original expression in 'Access decision log'

This commit is contained in:
Grégoire Pineau 2018-02-22 18:18:05 +01:00
parent 4a9e5c7099
commit 8f16c2e39e

View File

@ -317,7 +317,14 @@
</td>
<td>
{% if decision.attributes|length == 1 %}
{{ decision.attributes|first }}
{% set attribute = decision.attributes|first %}
{% if attribute.expression is defined %}
Expression: <pre><code>{{ attribute.expression }}</code></pre>
{% elseif attribute.type == 'string' %}
{{ attribute }}
{% else %}
{{ profiler_dump(attribute) }}
{% endif %}
{% else %}
{{ profiler_dump(decision.attributes) }}
{% endif %}