... I guess it should rather redirect to /admin/login, no ?
It's the case on the demo site, too.
Unfortunately, Symfony is incredibly strict with its firewalls paths patterns and as it's configured now, you will be redirected to /admin/login after accessing /admin/ not /admin.
How about creating a redirect route?
sylius_admin_panel:
path: /admin
defaults:
_controller: FrameworkBundle:Redirect:redirect
route: sylius_admin_dashboard
permanent: true
Why don't we just change the pattern from /admin/.* to /admin.*? :)
Wouldn't it match e.g. /adminstrable-product-permalink? I know there are little words starting with admin, but still we can have e.g. static pages like /administering-something etc.
(/admin/.*|/admin$) ?
/admin(?:/.*)?$?
Waiting for PR with proper fix 馃槃
@michalmarcinkowski done
I think redirect route should still be created.
With this patch, but without the redirect route, /admin correctly redirects to /admin/login, but then after login, it gets redirected back to /admin which doesn't work.
@emodric Good catch! @lchrusciel Care to submit another PR? Thanks!
@pjedrzejewski sure, I am on that.
Most helpful comment
Why don't we just change the pattern from
/admin/.*to/admin.*? :)