2

I would like to show the Symfony profiler bar (and access to profiler) only for page admins (ROLE_SUPER_ADMIN).

I have following this instructions: http://symfony.com/doc/2.8/cookbook/profiler/matchers.html#creating-a-custom-matcher

But there does not work. I get this error message:

AuthenticationCredentialsNotFoundException in classes.php line 2892:
The token storage contains no authentication token. One possible reason may be that there is no firewall configured for this URL.

Can anybody help me, or know this error message?

Thanks for all replies in future!

Marcel Deglau
  • 51
  • 1
  • 12
  • could you share the security.yml file ? it seems that the problem is there – zizoujab May 31 '16 at 21:59
  • 1
    Thank you for your reply! Here is a pastebin: http://pastebin.com/jJBFixkJ I have already found the issue. The following lines need to be uncommented: `firewall: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false` – Marcel Deglau Jun 01 '16 at 05:14

1 Answers1

0

Make sure the dev section in your security.yaml have the right arguments.

Make sure you uncomment the following lines in your security.yaml:

firewalls:
    dev:
        pattern: ^/(_(profiler|wdt)|css|images|js)/
        security: false

After there it should working fine.

Marcel Deglau
  • 51
  • 1
  • 12