eZ Platform Discussions

How to enable "Route is not allowed in current siteaccess" on my own controllers


#1

Hi all,

I have created my own page on the admin panel (/admin/order/list) but I would like to have the same behavior as the page /admin/dashboard, I mean, if I go to /dashboard, I have a Not Found Exception with the message “Route is not allowed in current siteaccess”. Actualy, if I go to /order/list I can access the controller.

How to say to ezplatform this route is only for admin siteaccess?

(PS: My controller already extends EzSystems\EzPlatformAdminUiBundle\Controller\Controller)

Thanks !


#2

Check this bundle we use for such a feature: https://github.com/netgen/NetgenSiteAccessRoutesBundle


#3

You could add follwing to your admin route:


#4

Thank you @gof, great bundle, it work fine!


#5

Thank you @da_real, I have not tested this solution because the bundle “netgen/siteaccess-routes-bundle” mentioned by @gof made the job.