0
votes

I want to use the SoanatAdminBundle with my User entity. I generate an AdminBundle, i want all the administration code in there.

When i go to localhost/app_dev.php/admin i see the sonata dashboard but i don't see my users list.

Service.xml (AdminBundle)

<services>
    <service id="admin.user" class="WebSite\AdminBundle\Admin\UserAdmin">
      <tag name="sonata.admin" manager_type="orm" group="admin" label="User"/>
        <argument />
        <argument>Website\UserBundle\Entity\User</argument>
        <argument>SonataAdminBundle:CRUD</argument>
    </service>
</services>

UserAdmin (AdminBundle\Admin\UserAdmin.php)

class UserAdmin extends Admin
{
       .... // Everything is ok
}

config.yml:

sonata_admin:
    dashboard:
        groups:
            admin.group.content:
                label: admin.group.content
                label_catalogue: AdminBundle
                items:
                    - admin.user
3

3 Answers

1
votes

I replace:

handler: sonata.admin.security.handler.role

by

handler: sonata.admin.security.handler.noop
0
votes

Try with:

sonata_admin:
    dashboard:
        groups:
            admin: ~
0
votes

You need to check if the admin is registered in the Dependency Container: app/console container:debug | grep admin.user. If nothing appear then the related file is not included in your extension.