Access denied, the user is not fully authenticated; sonata admin on production mode

I keep getting logged out from sonata admin on the editing page of some specific objects.
it works fine with ROLE_ADMIN but has a problem with my custom defined role.

I had this in config.yml:

session:
    # handler_id set to null will use default session handler from php.ini
    handler_id: ~

and I was getting this error:

security Access denied, the user is not fully authenticated; redirecting to authentication entry point.
Context: { “exception”: “Exception(SymfonyComponentSecurityCoreExceptionAccessDeniedException): Access Denied.” }

then I changed it to:

session:
    handler_id: 'session.handler.native_file'
    save_path: '%kernel.root_dir%/sessions/%kernel.environment%'
    cookie_lifetime: 259200
    gc_maxlifetime: 259200

after I cleared cache, my problem solved in developer mode(app_dev.php), but in production still remains.

Source: Symfony Questions

Was this helpful?

0 / 1

Leave a Reply 0

Your email address will not be published. Required fields are marked *