Skip to content

Commit c2d42ae

Browse files
committed
[Security][Profiler] Display the original expression in 'Access decision log'
1 parent 89d1b65 commit c2d42ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,12 @@
317317
</td>
318318
<td>
319319
{% if decision.attributes|length == 1 %}
320-
{{ decision.attributes|first }}
320+
{% set first = decision.attributes|first %}
321+
{% if first.expression is defined %}
322+
Expression: <code><pre>{{ first.expression }}</pre></code>
323+
{% else %}
324+
{{ first }}
325+
{% endif %}
321326
{% else %}
322327
{{ profiler_dump(decision.attributes) }}
323328
{% endif %}

0 commit comments

Comments
 (0)