Question

Maybe this is a silly question and I just don't get it, but I'm trying to use Sonata and FOSUserBundle with a custom provider, I have my admin users in "myapp/backbundle/Entity/Administrador" everything works fine, I can access to my admin panel using http_basic login but when I want to logout my user and then I go back and access to www.mydomain/admin/ it seems like I never logged out. I just want my admin users (just me) to access admin zone that's why I want a simple validation login/logout, my regular users have their section working differently. What I'm doing wrong Can somebody help me, please :)

I changed

fos_user: db_driver: orm firewall_name: main user_class: myapp/backbundle/Entity/Administrador

firewell: admin pattern: /admin/* http_basic: ~ logout: path: /admin/logout/ target: portada

It's is necesary to have a sonata:easy-extends:generate SonataUserBundle? Can't just have my backbundle bundle with my (custom-entity) provider?

Thank you so much!

Was it helpful?

Solution

Well, I finally managed to understand that if I want to use SonataAdminBundle and FOSUserBundle in the easy way (I hope to go further next time) I had to generate a new fos_user/user_class. what happened was that I already had a firewall that handles other type of admin and that's when everything got messed, next time I'll be more cautious, but thank you anyway!

It's better in that way because Fosuserbundle and Sonata needed that bundle to work properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top