Skip to content

Commit 8f16c2e

Browse files
committed
[Security][Profiler] Display the original expression in 'Access decision log'
1 parent 4a9e5c7 commit 8f16c2e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,14 @@
317317
</td>
318318
<td>
319319
{% if decision.attributes|length == 1 %}
320-
{{ decision.attributes|first }}
320+
{% set attribute = decision.attributes|first %}
321+
{% if attribute.expression is defined %}
322+
Expression: <pre><code>{{ attribute.expression }}</code></pre>
323+
{% elseif attribute.type == 'string' %}
324+
{{ attribute }}
325+
{% else %}
326+
{{ profiler_dump(attribute) }}
327+
{% endif %}
321328
{% else %}
322329
{{ profiler_dump(decision.attributes) }}
323330
{% endif %}

0 commit comments

Comments
 (0)