Search code examples
securitysymfony4sonata

Create admin user in Sonata symfony 4


I am using symfony4 with sonata admin panel. I need to make admin users to be able to use sonata via a login screen and ofcourse lock the admin area. I noticed that in general the FosUserBundle is not recommended anymore for symfony 4 and sonata. I have created a user class and controller. Is there any guide on how I can create user management without UserBundle but with securityBundle?


Solution

  • The best way is follow the documentation. i have done it twice and it worked... General start is: https://symfony.com/doc/current/security.html For going with database: https://symfony.com/doc/current/security/entity_provider.html#security-config-entity-provider

    You will have to make the edit masks by yorself