Here's the route I add in my plugin
routes.MapRoute("Plugin.CustomerAccount.PublicCustomerAccountList",
"Customer/Accounts",
new { controller = "PublicCustomerAccounts", action = "List" },
new[] { "Nop.Plugin.CustomerAccount.Controllers" }
);
It works fine when I'm logged in as admin. But otherwise, it directs me to the login page (with a ReturnUrl):
/login?ReturnUrl=%2fcustomer%2fAccounts
I still remain logged in.
When I put a breakpoint in the Login() method (in the core CustomerController), the stack trace shows only that it's coming from "External code". Expanding that, I see only calls from System.Web.Mvc (the last one coming from method
System.Web.Mvc.dll!System.Web.Mvc.ActionMethodDispatcher.Execute(...
So, I have no idea where this redirect is coming from. Thoughts?
(Might this be some anomaly in that I'm using one of the 'built-in' route urls - i.e. Customer/...) ?