V
V
Valery2013-08-26 14:15:28
symfony
Valery, 2013-08-26 14:15:28

How to show Symfony Web Profiler panel only for certain users?

Good afternoon,

Actually the question is in the title.
I would like to show the panel only for developers (certain role).
Can this be somehow implemented by standard means without finishing?

The option with connecting styles that hide the panel is not suitable.

Symfony 2.3

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zloyusr, 2013-08-26
@Akuma

through DI, we replace the Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener class with our own, embed security into it for role checks, and make a wrapper over the injectToolbar method.

S
Sergey, 2013-08-26
Protko @Fesor

For developers, a separate entry point is app_dev.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question