I have install SonataAdminBundle and configure it manage my Entities, however I have 2 Admin Roles : ROLE_ADMIN and ROLE_SUPER_ADMIN and I want to limit access to some Admin services for ROLE_ADMIN, I'm using this in security.yml file :
access_control:
- { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/ads, roles: ROLE_SUPER_ADMIN }
- { path: ^/admin, roles: ROLE_ADMIN }
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
it's work perfectly, when a user with ROLE_ADMIN click on manage Ads link, he will be in Access denied page, but I want to hidden this link in menu in top Nav and in Dashboard page, how I do this ? Thanks