Answer the question
In order to leave comments, you need to log in
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question