Integrating FOSUserBundle into the admin area
So far, we created a login system using FOSUserBundle
and an entity manager area via SonataAdminBundle
. So, the application has an admin area that has its access limits set to ROLE_ADMIN
people only. Before creating a dashboard for users so that they can manage their workspaces, projects, tasks, and team members, there is one last important thing that needs to be done. An admin should be able to manage all users from the backend.
The Sonata project comes with a bundle that integrates FOSUserBundle
into the admin area. It is called SonataUserBundle
that basically adds some features to FOSUserBundle
and makes it part of the backend.
Installing SonataUserBundle
Start by downloading and installing it:
$ composer require sonata-project/user-bundle 'dev-master'
Note
The installation might fail because of datagrid-bundle. If you are prompted for this issue, install datagrid-bundle first then continue with user-bundle:
composer require sonata-project/datagrid...